Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/DSUtil/WinAPIUtils.cpp')
-rw-r--r--src/DSUtil/WinAPIUtils.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/DSUtil/WinAPIUtils.cpp b/src/DSUtil/WinAPIUtils.cpp
index 930c90757..d16658acb 100644
--- a/src/DSUtil/WinAPIUtils.cpp
+++ b/src/DSUtil/WinAPIUtils.cpp
@@ -23,6 +23,7 @@
#include <Shlobj.h>
#include "WinAPIUtils.h"
#include "SysVersion.h"
+#include "PathUtils.h"
bool SetPrivilege(LPCTSTR privilege, bool bEnable)
@@ -259,7 +260,7 @@ bool ExploreToFile(LPCTSTR path)
bool success = false;
PIDLIST_ABSOLUTE pidl;
- if (FileExists(path) && SHParseDisplayName(path, nullptr, &pidl, 0, nullptr) == S_OK) {
+ if (PathUtils::Exists(path) && SHParseDisplayName(path, nullptr, &pidl, 0, nullptr) == S_OK) {
success = SUCCEEDED(SHOpenFolderAndSelectItems(pidl, 0, nullptr, 0));
CoTaskMemFree(pidl);
}
@@ -267,25 +268,6 @@ bool ExploreToFile(LPCTSTR path)
return success;
}
-bool FileExists(LPCTSTR fileName)
-{
- return (INVALID_FILE_ATTRIBUTES != ::GetFileAttributes(fileName));
-}
-
-CString GetProgramPath(bool bWithExecutableName /*= false*/)
-{
- CString path;
-
- DWORD dwLength = ::GetModuleFileName(nullptr, path.GetBuffer(MAX_PATH), MAX_PATH);
- path.ReleaseBuffer((int)dwLength);
-
- if (!bWithExecutableName) {
- path = path.Left(path.ReverseFind(_T('\\')) + 1);
- }
-
- return path;
-}
-
CoInitializeHelper::CoInitializeHelper()
{
HRESULT res = CoInitializeEx(nullptr, COINIT_MULTITHREADED);