MCPcopy Create free account
hub / github.com/Schnocker/NoEye / LoadFileA

Function LoadFileA

NoEye_Service/CMap.cpp:8–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 BOOL WINAPI BuildFile_Thread(WDLL* wDll);
7
8 BOOL LoadFileA(HANDLE hProcess, LPCSTR Path, DWORD Flags, WDLL*& wFile)
9 {
10
11 LPWSTR wPath = 0;
12 INT Size = 0;
13 BOOL Result = 0;
14 Size = MultiByteToWideChar(CP_UTF8, 0, Path, -1, NULL, 0);
15 if (!Size)
16 {
17 SetLastError(1220);
18 return FALSE;
19 }
20 wPath = new wchar_t[Size];
21 if (!wPath)
22 {
23 SetLastError(1221);
24 return FALSE;
25 }
26 if (!MultiByteToWideChar(CP_UTF8, 0, Path, -1, wPath, Size))
27 {
28 if (wPath) delete wPath;
29 SetLastError(1222);
30 return FALSE;
31 }
32 Result = LoadFileW(hProcess, wPath, Flags, wFile);
33 if (wPath) delete wPath;
34
35 return Result;
36 }
37 BOOL LoadFileW(HANDLE hProcess, LPCWSTR Path, DWORD Flags, WDLL*& wFile)
38 {
39

Callers 1

ServiceThreadFunction · 0.85

Calls 1

LoadFileWFunction · 0.85

Tested by

no test coverage detected