mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
[W32KNAPI] - Add some more NtUserGetIconInfo tests
svn path=/trunk/; revision=48103
This commit is contained in:
parent
715a75ef6b
commit
ec5e0ea56a
1 changed files with 41 additions and 0 deletions
|
@ -4,6 +4,9 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
|
||||||
HICON hIcon;
|
HICON hIcon;
|
||||||
ICONINFO iinfo;
|
ICONINFO iinfo;
|
||||||
HBITMAP mask, color;
|
HBITMAP mask, color;
|
||||||
|
UNICODE_STRING hInstStr;
|
||||||
|
UNICODE_STRING ResourceStr;
|
||||||
|
DWORD bpp = 0;
|
||||||
|
|
||||||
ZeroMemory(&iinfo, sizeof(ICONINFO));
|
ZeroMemory(&iinfo, sizeof(ICONINFO));
|
||||||
|
|
||||||
|
@ -58,5 +61,43 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
|
||||||
|
|
||||||
DestroyIcon(hIcon);
|
DestroyIcon(hIcon);
|
||||||
|
|
||||||
|
/* Test full param, with local icon */
|
||||||
|
hIcon = LoadImageA(GetModuleHandle(NULL),
|
||||||
|
MAKEINTRESOURCE(IDI_ICON),
|
||||||
|
IMAGE_ICON,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
LR_DEFAULTSIZE);
|
||||||
|
|
||||||
|
TEST(hIcon != NULL);
|
||||||
|
|
||||||
|
RtlInitUnicodeString(&hInstStr, NULL);
|
||||||
|
RtlInitUnicodeString(&ResourceStr, NULL);
|
||||||
|
|
||||||
|
TEST(NtUserGetIconInfo(hIcon,
|
||||||
|
&iinfo,
|
||||||
|
&hInstStr,
|
||||||
|
&ResourceStr,
|
||||||
|
&bpp,
|
||||||
|
FALSE) == TRUE);
|
||||||
|
|
||||||
|
TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
|
||||||
|
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(IDI_ICON));
|
||||||
|
TEST(bpp == 32);
|
||||||
|
|
||||||
|
/* Last param doesn't seem to matter*/
|
||||||
|
TEST(NtUserGetIconInfo(hIcon,
|
||||||
|
&iinfo,
|
||||||
|
&hInstStr,
|
||||||
|
&ResourceStr,
|
||||||
|
&bpp,
|
||||||
|
TRUE) == TRUE);
|
||||||
|
|
||||||
|
TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
|
||||||
|
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(IDI_ICON));
|
||||||
|
TEST(bpp == 32);
|
||||||
|
|
||||||
|
DestroyIcon(hIcon);
|
||||||
|
|
||||||
return APISTATUS_NORMAL;
|
return APISTATUS_NORMAL;
|
||||||
}
|
}
|
Loading…
Reference in a new issue