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

Function ImportNTDll

BeefySysLib/platform/win/Platform.cpp:163–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161static HMODULE gNTDll = NULL;
162
163static void ImportNTDll()
164{
165 if (gNTDll != NULL)
166 return;
167
168 WCHAR path[MAX_PATH];
169 GetSystemDirectory(path, MAX_PATH);
170 wcscat(path, L"\\ntdll.dll");
171 gNTDll = GetModuleHandle(path);
172 if (gNTDll == NULL)
173 {
174 return;
175 }
176 gNtQuerySystemInformation = (NtQuerySystemInformation_t)GetProcAddress(gNTDll, "NtQuerySystemInformation");
177}
178
179typedef HRESULT(WINAPI* SetThreadDescription_t)(HANDLE hThread, PCWSTR lpThreadDescription);
180typedef HRESULT(WINAPI* GetThreadDescription_t)(HANDLE hThread, PWSTR* lpThreadDescription);

Callers 2

BfpProcess_EnumerateFunction · 0.85
BfpSpawn_KillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected