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

Function kwsysProcess_List__New_Snapshot

Source/kwsys/ProcessWin32.c:2429–2449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2427}
2428
2429static int kwsysProcess_List__New_Snapshot(kwsysProcess_List* self)
2430{
2431 /* Get a handle to the Windows runtime module that should already be
2432 loaded in this program. This does not actually increment the
2433 reference count to the module so we do not need to close the
2434 handle. */
2435 HMODULE hKernel = GetModuleHandleW(L"kernel32.dll");
2436 if (hKernel) {
2437 self->P_CreateToolhelp32Snapshot =
2438 ((CreateToolhelp32SnapshotType)GetProcAddress(
2439 hKernel, "CreateToolhelp32Snapshot"));
2440 self->P_Process32First =
2441 ((Process32FirstType)GetProcAddress(hKernel, "Process32First"));
2442 self->P_Process32Next =
2443 ((Process32NextType)GetProcAddress(hKernel, "Process32Next"));
2444 }
2445 return (self->P_CreateToolhelp32Snapshot && self->P_Process32First &&
2446 self->P_Process32Next)
2447 ? 1
2448 : 0;
2449}
2450
2451static void kwsysProcess_List__Delete_Snapshot(kwsysProcess_List* self)
2452{

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…