| 2345 | } |
| 2346 | |
| 2347 | static 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 | |
| 2370 | static void kwsysProcess_List__Delete_NT4(kwsysProcess_List* self) |
| 2371 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…