MCPcopy Create free account
hub / github.com/Kitware/CMake / kwsysProcess_List__New_NT4

Function kwsysProcess_List__New_NT4

Source/kwsys/ProcessWin32.c:2347–2368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2345}
2346
2347static int kwsysProcess_List__New_NT4(kwsysProcess_List* self)
2348{
2349 /* Get a handle to the NT runtime module that should already be
2350 loaded in this program. This does not actually increment the
2351 reference count to the module so we do not need to close the
2352 handle. */
2353 HMODULE hNT = GetModuleHandleW(L"ntdll.dll");
2354 if (hNT) {
2355 /* Get pointers to the needed API functions. */
2356 self->P_ZwQuerySystemInformation =
2357 ((ZwQuerySystemInformationType)GetProcAddress(
2358 hNT, "ZwQuerySystemInformation"));
2359 }
2360 if (!self->P_ZwQuerySystemInformation) {
2361 return 0;
2362 }
2363
2364 /* Allocate an initial process information buffer. */
2365 self->BufferSize = 32768;
2366 self->Buffer = (char*)malloc(self->BufferSize);
2367 return self->Buffer ? 1 : 0;
2368}
2369
2370static void kwsysProcess_List__Delete_NT4(kwsysProcess_List* self)
2371{

Callers 1

kwsysProcess_List_NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…