Author: jgardou
Date: Sun Jul 18 16:57:32 2010
New Revision: 48106

URL: http://svn.reactos.org/svn/reactos?rev=48106&view=rev
Log:
[W32KNAPI]  - More tests to NtUserGetIconInfo

Modified:
    trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c

Modified: trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c?rev=48106&r1=48105&r2=48106&view=diff
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c [iso-8859-1] 
(original)
+++ trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c [iso-8859-1] 
Sun Jul 18 16:57:32 2010
@@ -99,5 +99,51 @@
 
        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;
 }


Reply via email to