Author: gadamopoulos
Date: Tue Oct 30 13:29:11 2012
New Revision: 57651
URL:
http://svn.reactos.org/svn/reactos?rev=57651&view=rev
Log:
[user32_apitest]
- Add a test for LR_SHARED flag for LoadImage
Added:
trunk/rostests/apitests/user32/LoadImage.c (with props)
Modified:
trunk/rostests/apitests/user32/CMakeLists.txt
trunk/rostests/apitests/user32/testlist.c
Modified: trunk/rostests/apitests/user32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
==============================================================================
--- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Tue Oct 30 13:29:11 2012
@@ -10,6 +10,7 @@
GetPeekMessage.c
GetSystemMetrics.c
InitializeLpkHooks.c
+ LoadImage.c
RealGetWindowClass.c
ScrollDC.c
ScrollWindowEx.c
Added: trunk/rostests/apitests/user32/LoadImage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/LoadImage…
==============================================================================
--- trunk/rostests/apitests/user32/LoadImage.c (added)
+++ trunk/rostests/apitests/user32/LoadImage.c [iso-8859-1] Tue Oct 30 13:29:11 2012
@@ -1,0 +1,38 @@
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+#include "resource.h"
+
+START_TEST(LoadImage)
+{
+ char path[MAX_PATH];
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si;
+ HANDLE handle;
+
+ char **test_argv;
+ int argc = winetest_get_mainargs( &test_argv );
+
+ /* Now check its behaviour regarding Shared icons/cursors */
+ handle = LoadImageW( GetModuleHandle(NULL), L"TESTCURSOR", IMAGE_CURSOR, 0,
0, LR_SHARED | LR_DEFAULTSIZE );
+ ok(handle != 0, "\n");
+
+ if (argc >= 3)
+ {
+ HANDLE arg;
+
+ sscanf (test_argv[2], "%lu", (ULONG_PTR*) &arg);
+
+ ok(handle != arg, "Got same handles\n");
+
+ return;
+ }
+
+ /* Start child process */
+ sprintf( path, "%s LoadImage %lu", test_argv[0], (ULONG_PTR)handle );
+ memset( &si, 0, sizeof(si) );
+ si.cb = sizeof(si);
+ CreateProcessA( NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi );
+ WaitForSingleObject (pi.hProcess, INFINITE);
+}
Propchange: trunk/rostests/apitests/user32/LoadImage.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/rostests/apitests/user32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/testlist.…
==============================================================================
--- trunk/rostests/apitests/user32/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/testlist.c [iso-8859-1] Tue Oct 30 13:29:11 2012
@@ -14,6 +14,7 @@
extern void func_GetPeekMessage(void);
extern void func_GetSystemMetrics(void);
extern void func_InitializeLpkHooks(void);
+extern void func_LoadImage(void);
extern void func_RealGetWindowClass(void);
extern void func_ScrollDC(void);
extern void func_ScrollWindowEx(void);
@@ -35,6 +36,7 @@
{ "GetPeekMessage", func_GetPeekMessage },
{ "GetSystemMetrics", func_GetSystemMetrics },
{ "InitializeLpkHooks", func_InitializeLpkHooks },
+ { "LoadImage", func_LoadImage },
{ "RealGetWindowClass", func_RealGetWindowClass },
{ "ScrollDC", func_ScrollDC },
{ "ScrollWindowEx", func_ScrollWindowEx },