mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 13:33:42 +00:00
[W32KNAPI] - More tests to NtUserGetIconInfo
svn path=/trunk/; revision=48106
This commit is contained in:
parent
2946af0b8e
commit
a6017cd9b2
1 changed files with 46 additions and 0 deletions
|
@ -99,5 +99,51 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
|
|||
|
||||
DestroyIcon(hIcon);
|
||||
|
||||
/* Test full param, with foreign icon */
|
||||
hIcon = LoadImageA(GetModuleHandleA("shell32.dll"),
|
||||
MAKEINTRESOURCE(293),
|
||||
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(hInstStr.Length == 0);
|
||||
TEST(hInstStr.MaximumLength == 0);
|
||||
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293));
|
||||
TEST(ResourceStr.Length == 0);
|
||||
TEST(ResourceStr.MaximumLength == 0);
|
||||
TEST(bpp == 32);
|
||||
|
||||
RtlInitUnicodeString(&hInstStr, NULL);
|
||||
RtlInitUnicodeString(&ResourceStr, NULL);
|
||||
|
||||
TEST(NtUserGetIconInfo(hIcon,
|
||||
&iinfo,
|
||||
&hInstStr,
|
||||
&ResourceStr,
|
||||
&bpp,
|
||||
TRUE) == TRUE);
|
||||
|
||||
TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
|
||||
TEST(hInstStr.Length == 0);
|
||||
TEST(hInstStr.MaximumLength == 0);
|
||||
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293));
|
||||
TEST(bpp == 32);
|
||||
|
||||
DestroyIcon(hIcon);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
Loading…
Reference in a new issue