| 2427 | } |
| 2428 | |
| 2429 | static 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 | |
| 2451 | static void kwsysProcess_List__Delete_Snapshot(kwsysProcess_List* self) |
| 2452 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…