| 173 | return result; |
| 174 | } |
| 175 | LPVOID GetFunction(LPCSTR dll, LPCSTR function) |
| 176 | { |
| 177 | HMODULE module = GetModuleHandleA(dll); |
| 178 | |
| 179 | if (!module) |
| 180 | { |
| 181 | if (IsAtLeastWindows10()) // LoadLibraryA here crashes apps on Windows 7, such as explorer.exe |
| 182 | { |
| 183 | module = LoadLibraryA(dll); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | return module ? (LPVOID)GetProcAddress(module, function) : NULL; |
| 188 | } |
| 189 | BOOL GetProcessIntegrityLevel(HANDLE process, LPDWORD integrityLevel) |
| 190 | { |
| 191 | BOOL result = FALSE; |
no test coverage detected