Author: hbelusca
Date: Wed Oct 12 11:36:16 2016
New Revision: 72958

URL: http://svn.reactos.org/svn/reactos?rev=72958&view=rev
Log:
[WINETESTS/SETUPAPI]: setupapi/tests: Determine path to system32 directory at 
runtime. Synced from Wine-Staging commit 
92510a34ed9ec67fec4e580a5c73b8b53c216734
ROSTESTS-234 #comment Updated in r72958.

Modified:
    trunk/rostests/winetests/setupapi/dialog.c

Modified: trunk/rostests/winetests/setupapi/dialog.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/dialog.c?rev=72958&r1=72957&r2=72958&view=diff
==============================================================================
--- trunk/rostests/winetests/setupapi/dialog.c  [iso-8859-1] (original)
+++ trunk/rostests/winetests/setupapi/dialog.c  [iso-8859-1] Wed Oct 12 
11:36:16 2016
@@ -32,16 +32,13 @@
 
 static void test_SetupPromptForDiskA(void)
 {
-#ifdef __REACTOS__
-    char path[] = "C:\\ReactOS\\system32";
-#else
-    #error "path must use GetSystemDirectoryA()! ROSTESTS_234"
-    char path[] = "C:\\windows\\system32";
-#endif
     char file[] = "kernel32.dll";
+    char path[MAX_PATH];
     char buffer[MAX_PATH];
     UINT ret;
     DWORD length;
+
+    GetSystemDirectoryA(path, MAX_PATH);
 
     memset(buffer, 0, sizeof(buffer));
     ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, file, 0, 
IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length);
@@ -71,18 +68,15 @@
 
 static void test_SetupPromptForDiskW(void)
 {
-#ifdef __REACTOS__
-    WCHAR path[] = 
{'C',':','\\','R','e','a','c','t','O','S','\\','s','y','s','t','e','m','3','2','\0'};
-#else
-    #error "path must use GetSystemDirectoryW()! ROSTESTS_234"
-    WCHAR path[] = 
{'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m','3','2','\0'};
-#endif
     WCHAR file[] = {'k','e','r','n','e','l','3','2','.','d','l','l','\0'};
     WCHAR title[] = {'T','e','s','t','\0'};
     WCHAR disk[] = {'T','e','s','t','d','i','s','k','\0'};
+    WCHAR path[MAX_PATH];
     WCHAR buffer[MAX_PATH];
     UINT ret;
     DWORD length;
+
+    GetSystemDirectoryW(path, MAX_PATH);
 
     memset(buffer, 0, sizeof(buffer));
     ret = SetupPromptForDiskW(0, title, disk, path, file, 0, IDF_CHECKFIRST, 
buffer, MAX_PATH-1, &length);


Reply via email to