| 393 | return FALSE; |
| 394 | } |
| 395 | BOOL GetPathFromHandle(HANDLE file, PWCHAR fileName, DWORD fileNameLength) |
| 396 | { |
| 397 | BOOL result = FALSE; |
| 398 | |
| 399 | WCHAR path[MAX_PATH + 1]; |
| 400 | if (GetFinalPathNameByHandleW(file, path, MAX_PATH, FILE_NAME_NORMALIZED) > 0 && !StrCmpNIW(path, L"\\\\?\\", 4)) |
| 401 | { |
| 402 | PWCHAR resultFileName = &path[4]; |
| 403 | if ((DWORD)lstrlenW(resultFileName) <= fileNameLength) |
| 404 | { |
| 405 | StrCpyW(fileName, resultFileName); |
| 406 | result = TRUE; |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | return result; |
| 411 | } |
| 412 | BOOL ReadFileContent(LPCWSTR path, LPBYTE *data, LPDWORD size) |
| 413 | { |
| 414 | BOOL result = FALSE; |
no outgoing calls
no test coverage detected