setupapi: Use GetSystemDirectory() rather than hardcoding 'system32'.

Francois Gouget fgouget at codeweavers.com
Wed Dec 20 11:58:07 CST 2006


---
 dlls/setupapi/query.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c
index 82eb62d..6339e09 100644
--- a/dlls/setupapi/query.c
+++ b/dlls/setupapi/query.c
@@ -87,13 +87,13 @@ static HINF search_for_inf(LPCVOID InfSpec, DWORD SearchControl)
     HINF hInf = INVALID_HANDLE_VALUE;
     WCHAR inf_path[MAX_PATH];
 
+    static const WCHAR bslashW[] = {'\\',0};
     static const WCHAR infW[] = {'\\','i','n','f','\\',0};
-    static const WCHAR system32W[] = {'\\','s','y','s','t','e','m','3','2','\\',0};
 
     if (SearchControl == INFINFO_REVERSE_DEFAULT_SEARCH)
     {
-        GetWindowsDirectoryW(inf_path, MAX_PATH);
-        lstrcatW(inf_path, system32W);
+        GetSystemDirectoryW(inf_path, MAX_PATH);
+        lstrcatW(inf_path, bslashW);
         lstrcatW(inf_path, InfSpec);
 
         hInf = SetupOpenInfFileW(inf_path, NULL,
-- 
1.4.4.1



More information about the wine-patches mailing list