MCPcopy Create free account
hub / github.com/beefytech/Beef / ImportKernel

Function ImportKernel

BeefySysLib/platform/win/Platform.cpp:185–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183static HMODULE gKernelDll = NULL;
184
185static 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

Callers 2

BfpThread_SetNameFunction · 0.70
BfpThread_GetNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected