mirror of
https://github.com/reactos/reactos.git
synced 2025-05-27 21:18:15 +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)
|
static void test_GetModuleInformation(void)
|
||||||
{
|
{
|
||||||
HMODULE hMod = GetModuleHandleA(NULL);
|
HMODULE hMod = GetModuleHandleA(NULL);
|
||||||
|
DWORD *tmp, counter = 0;
|
||||||
MODULEINFO info;
|
MODULEINFO info;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
|
@ -168,10 +169,21 @@ static void test_GetModuleInformation(void)
|
||||||
pGetModuleInformation(hpQV, hMod, &info, sizeof(info)-1);
|
pGetModuleInformation(hpQV, hMod, &info, sizeof(info)-1);
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = pGetModuleInformation(hpQV, hMod, &info, sizeof(info));
|
ret = pGetModuleInformation(hpQV, hMod, &info, sizeof(info));
|
||||||
ok(ret == 1, "failed with %d\n", GetLastError());
|
ok(ret == 1, "failed with %d\n", GetLastError());
|
||||||
ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
|
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)
|
static BOOL check_with_margin(SIZE_T perf, SIZE_T sysperf, int margin)
|
||||||
|
|
Loading…
Reference in a new issue