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

Alexandre Julliard julliard at winehq.org
Wed Dec 20 12:36:07 CST 2006


Francois Gouget <fgouget at codeweavers.com> writes:

> @@ -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);

It's really supposed to hardcode system32, at least according to MSDN.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list