Skip to content

Commit 1d3fa0b

Browse files
committed
[MPR]
Import Wine commit: - 80eb2fa08eb21ba9504438493fa66097ed03faf5, Add support for REG_EXPAND_SZ for providers path. This fixes VMware network provider (vmhgfs.dll) not being able to be loaded in ReactOS. CORE-10032 svn path=/trunk/; revision=70645
1 parent 259b984 commit 1d3fa0b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

reactos/dll/win32/mpr/wnet.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,17 @@ static void _tryLoadProvider(PCWSTR provider)
123123
DWORD type, size = sizeof(providerPath);
124124

125125
if (RegQueryValueExW(hKey, szProviderPath, NULL, &type,
126-
(LPBYTE)providerPath, &size) == ERROR_SUCCESS && type == REG_SZ)
126+
(LPBYTE)providerPath, &size) == ERROR_SUCCESS && (type == REG_SZ || type == REG_EXPAND_SZ))
127127
{
128128
static const WCHAR szProviderName[] = { 'N','a','m','e',0 };
129129
PWSTR name = NULL;
130-
130+
131+
if (type == REG_EXPAND_SZ)
132+
{
133+
WCHAR path[MAX_PATH];
134+
if (ExpandEnvironmentStringsW(providerPath, path, MAX_PATH)) lstrcpyW( providerPath, path );
135+
}
136+
131137
size = 0;
132138
RegQueryValueExW(hKey, szProviderName, NULL, NULL, NULL, &size);
133139
if (size)

0 commit comments

Comments
 (0)