| 183 | static HMODULE gKernelDll = NULL; |
| 184 | |
| 185 | static void ImportKernel() |
| 186 | { |
| 187 | if (gKernelDll != NULL) |
| 188 | return; |
| 189 | |
| 190 | WCHAR path[MAX_PATH]; |
| 191 | GetSystemDirectory(path, MAX_PATH); |
| 192 | wcscat(path, L"\\kernel32.dll"); |
| 193 | gKernelDll = GetModuleHandle(path); |
| 194 | if (gKernelDll == NULL) |
| 195 | { |
| 196 | return; |
| 197 | } |
| 198 | |
| 199 | gSetThreadDescription = (SetThreadDescription_t)GetProcAddress(gKernelDll, "SetThreadDescription"); |
| 200 | gGetThreadDescription = (GetThreadDescription_t)GetProcAddress(gKernelDll, "GetThreadDescription"); |
| 201 | } |
| 202 | |
| 203 | #ifdef BF_MINGW |
| 204 | #define timeGetTime GetTickCount |
no outgoing calls
no test coverage detected