Commit 80eb2fa0 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

mpr: Add support for REG_EXPAND_SZ for providers path.

parent 198e0d5d
...@@ -133,11 +133,17 @@ static void _tryLoadProvider(PCWSTR provider) ...@@ -133,11 +133,17 @@ static void _tryLoadProvider(PCWSTR provider)
DWORD type, size = sizeof(providerPath); DWORD type, size = sizeof(providerPath);
if (RegQueryValueExW(hKey, szProviderPath, NULL, &type, 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 }; static const WCHAR szProviderName[] = { 'N','a','m','e',0 };
PWSTR name = NULL; PWSTR name = NULL;
if (type == REG_EXPAND_SZ)
{
WCHAR path[MAX_PATH];
if (ExpandEnvironmentStringsW(providerPath, path, MAX_PATH)) lstrcpyW( providerPath, path );
}
size = 0; size = 0;
RegQueryValueExW(hKey, szProviderName, NULL, NULL, NULL, &size); RegQueryValueExW(hKey, szProviderName, NULL, NULL, NULL, &size);
if (size) if (size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment