shlwapi: Store rekistry key name in unicode to avoid conversion.
This commit is contained in:
parent
66259555ff
commit
a1f3af39b3
|
@ -1580,14 +1580,18 @@ static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
|
||||||
{
|
{
|
||||||
HKEY newkey;
|
HKEY newkey;
|
||||||
DWORD data_len, dwType;
|
DWORD data_len, dwType;
|
||||||
WCHAR reg_path[MAX_PATH];
|
|
||||||
WCHAR value[MAX_PATH], data[MAX_PATH];
|
WCHAR value[MAX_PATH], data[MAX_PATH];
|
||||||
|
|
||||||
|
static const WCHAR prefix_keyW[] =
|
||||||
|
{'S','o','f','t','w','a','r','e',
|
||||||
|
'\\','M','i','c','r','o','s','o','f','t',
|
||||||
|
'\\','W','i','n','d','o','w','s',
|
||||||
|
'\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
|
||||||
|
'\\','U','R','L',
|
||||||
|
'\\','D','e','f','a','u','l','t','P','r','e','f','i','x',0};
|
||||||
|
|
||||||
/* get and prepend default */
|
/* get and prepend default */
|
||||||
MultiByteToWideChar(0, 0,
|
RegOpenKeyExW(HKEY_LOCAL_MACHINE, prefix_keyW, 0, 1, &newkey);
|
||||||
"Software\\Microsoft\\Windows\\CurrentVersion\\URL\\DefaultPrefix",
|
|
||||||
-1, reg_path, MAX_PATH);
|
|
||||||
RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, 1, &newkey);
|
|
||||||
data_len = MAX_PATH;
|
data_len = MAX_PATH;
|
||||||
value[0] = '@';
|
value[0] = '@';
|
||||||
value[1] = '\0';
|
value[1] = '\0';
|
||||||
|
|
Loading…
Reference in New Issue