Pierre Schweitzer : mpr: Add support for REG_EXPAND_SZ for providers path.
Alexandre Julliard
julliard at winehq.org
Fri Oct 7 15:09:15 CDT 2016
Module: wine
Branch: stable
Commit: 97585fed061bb7ce0eb2e292da6a88b7348070c6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=97585fed061bb7ce0eb2e292da6a88b7348070c6
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Mon Jan 25 08:17:48 2016 +0100
mpr: Add support for REG_EXPAND_SZ for providers path.
Signed-off-by: Pierre Schweitzer <pierre at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 80eb2fa08eb21ba9504438493fa66097ed03faf5)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/mpr/wnet.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index dd34969..f130de0 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -133,11 +133,17 @@ static void _tryLoadProvider(PCWSTR provider)
DWORD type, size = sizeof(providerPath);
if (RegQueryValueExW(hKey, szProviderPath, NULL, &type,
- (LPBYTE)providerPath, &size) == ERROR_SUCCESS && type == REG_SZ)
+ (LPBYTE)providerPath, &size) == ERROR_SUCCESS && (type == REG_SZ || type == REG_EXPAND_SZ))
{
static const WCHAR szProviderName[] = { 'N','a','m','e',0 };
PWSTR name = NULL;
-
+
+ if (type == REG_EXPAND_SZ)
+ {
+ WCHAR path[MAX_PATH];
+ if (ExpandEnvironmentStringsW(providerPath, path, MAX_PATH)) lstrcpyW( providerPath, path );
+ }
+
size = 0;
RegQueryValueExW(hKey, szProviderName, NULL, NULL, NULL, &size);
if (size)
More information about the wine-cvs
mailing list