| 100 | return 1; |
| 101 | } |
| 102 | BOOL LoadFileFromResourcesA(HANDLE hProcess, LPCSTR lpName, LPCSTR ResourceType, DWORD Flags, WDLL*& wFile) |
| 103 | { |
| 104 | |
| 105 | LPWSTR wName = 0, wResType = 0; |
| 106 | INT NameSize = 0, ResTypeSize = 0; |
| 107 | BOOL Result = 0; |
| 108 | NameSize = MultiByteToWideChar(CP_UTF8, 0, lpName, -1, NULL, 0); |
| 109 | if (!NameSize) |
| 110 | { |
| 111 | SetLastError(2030); |
| 112 | return FALSE; |
| 113 | } |
| 114 | wName = new wchar_t[NameSize]; |
| 115 | if (!wName) |
| 116 | { |
| 117 | SetLastError(2032); |
| 118 | return FALSE; |
| 119 | } |
| 120 | ResTypeSize = MultiByteToWideChar(CP_UTF8, 0, ResourceType, -1, NULL, 0); |
| 121 | if (!ResTypeSize) |
| 122 | { |
| 123 | SetLastError(2030); |
| 124 | if (wName) delete wName; |
| 125 | return FALSE; |
| 126 | } |
| 127 | wResType = new wchar_t[ResTypeSize]; |
| 128 | if (!wResType) |
| 129 | { |
| 130 | SetLastError(2032); |
| 131 | if (wName) delete wName; |
| 132 | return FALSE; |
| 133 | } |
| 134 | if (!MultiByteToWideChar(CP_UTF8, 0, lpName, -1, wName, NameSize) || |
| 135 | !MultiByteToWideChar(CP_UTF8, 0, ResourceType, -1, wResType, ResTypeSize)) |
| 136 | { |
| 137 | if (wName) delete wName; |
| 138 | if (wResType) delete wResType; |
| 139 | SetLastError(2032); |
| 140 | return FALSE; |
| 141 | } |
| 142 | Result = LoadFileFromResourcesW(hProcess, wName, wResType, Flags, wFile); |
| 143 | if (wName) delete wName; |
| 144 | if (wResType) delete wResType; |
| 145 | |
| 146 | return Result; |
| 147 | } |
| 148 | BOOL LoadFileFromResourcesW(HANDLE hProcess, LPCWSTR lpName, LPCWSTR ResourceType, DWORD Flags, WDLL*& wFile) |
| 149 | { |
| 150 |
nothing calls this directly
no test coverage detected