mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
[PSAPI_WINETEST] Sync with Wine Staging 2.16. CORE-13762
This commit is contained in:
parent
3ce9d8ab17
commit
bff534936a
1 changed files with 13 additions and 1 deletions
|
@ -149,6 +149,7 @@ static void test_EnumProcessModules(void)
|
|||
static void test_GetModuleInformation(void)
|
||||
{
|
||||
HMODULE hMod = GetModuleHandleA(NULL);
|
||||
DWORD *tmp, counter = 0;
|
||||
MODULEINFO info;
|
||||
DWORD ret;
|
||||
|
||||
|
@ -168,10 +169,21 @@ static void test_GetModuleInformation(void)
|
|||
pGetModuleInformation(hpQV, hMod, &info, sizeof(info)-1);
|
||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pGetModuleInformation(hpQV, hMod, &info, sizeof(info));
|
||||
ok(ret == 1, "failed with %d\n", GetLastError());
|
||||
ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
|
||||
|
||||
hMod = LoadLibraryA("shell32.dll");
|
||||
ok(hMod != NULL, "Failed to load shell32.dll, error: %u\n", GetLastError());
|
||||
|
||||
ret = pGetModuleInformation(hpQV, hMod, &info, sizeof(info));
|
||||
ok(ret == 1, "failed with %d\n", GetLastError());
|
||||
info.SizeOfImage /= sizeof(DWORD);
|
||||
for (tmp = (DWORD *)hMod; info.SizeOfImage; info.SizeOfImage--)
|
||||
counter ^= *tmp++;
|
||||
trace("xor of shell32: %08x\n", counter);
|
||||
|
||||
FreeLibrary(hMod);
|
||||
}
|
||||
|
||||
static BOOL check_with_margin(SIZE_T perf, SIZE_T sysperf, int margin)
|
||||
|
|
Loading…
Reference in a new issue