DBG: updated DeviceNameResolver
This commit is contained in:
parent
e626270bfc
commit
65c2a4dfee
|
@ -8,12 +8,12 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSize);
|
||||
__declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSize);
|
||||
__declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSize);
|
||||
__declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSize);
|
||||
__declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSize);
|
||||
__declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSize);
|
||||
__declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSizeInChars);
|
||||
__declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSizeInChars);
|
||||
__declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSizeInChars);
|
||||
__declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSizeInChars);
|
||||
__declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSizeInChars);
|
||||
__declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSizeInChars);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ bool GetFileNameFromProcessHandle(HANDLE hProcess, char* szFileName)
|
|||
return false;
|
||||
|
||||
wchar_t wszFileName[MAX_PATH] = L"";
|
||||
if(!DevicePathToPathW(wszDosFileName, wszFileName, MAX_PATH * sizeof(wchar_t)))
|
||||
if(!DevicePathToPathW(wszDosFileName, wszFileName, _countof(wszFileName)))
|
||||
return false;
|
||||
strcpy_s(szFileName, MAX_PATH, StringUtils::Utf16ToUtf8(wszFileName).c_str());
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue