Commit 71288ba5 authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

mscoree: Use wide string syntax in create_monodata.

parent 17b34ca8
......@@ -1718,13 +1718,9 @@ end:
HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
{
static const WCHAR wszAssembly[] = {'A','s','s','e','m','b','l','y',0};
static const WCHAR wszCodebase[] = {'C','o','d','e','B','a','s','e',0};
static const WCHAR wszClass[] = {'C','l','a','s','s',0};
static const WCHAR wszFileSlash[] = {'f','i','l','e',':','/','/','/',0};
static const WCHAR wszCLSIDSlash[] = {'C','L','S','I','D','\\',0};
static const WCHAR wszInprocServer32[] = {'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
static const WCHAR wszDLL[] = {'.','d','l','l',0};
static const WCHAR wszFileSlash[] = L"file:///";
static const WCHAR wszCLSIDSlash[] = L"CLSID\\";
static const WCHAR wszInprocServer32[] = L"\\InprocServer32";
WCHAR path[CHARS_IN_GUID + ARRAY_SIZE(wszCLSIDSlash) + ARRAY_SIZE(wszInprocServer32) - 1];
MonoDomain *domain;
MonoAssembly *assembly;
......@@ -1751,7 +1747,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, path, 0, KEY_READ, &key);
if (res != ERROR_FILE_NOT_FOUND)
{
res = RegGetValueW( key, NULL, wszClass, RRF_RT_REG_SZ, NULL, classname, &dwBufLen);
res = RegGetValueW( key, NULL, L"Class", RRF_RT_REG_SZ, NULL, classname, &dwBufLen);
if(res != ERROR_SUCCESS)
{
WARN("Class value cannot be found.\n");
......@@ -1762,7 +1758,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
TRACE("classname (%s)\n", debugstr_w(classname));
dwBufLen = MAX_PATH + 8;
res = RegGetValueW( key, NULL, wszCodebase, RRF_RT_REG_SZ, NULL, codebase, &dwBufLen);
res = RegGetValueW( key, NULL, L"CodeBase", RRF_RT_REG_SZ, NULL, codebase, &dwBufLen);
if(res == ERROR_SUCCESS)
{
/* Strip file:/// */
......@@ -1797,7 +1793,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
if (res != ERROR_SUCCESS)
goto cleanup;
dwBufLen = MAX_PATH + 8;
res = RegGetValueW(subkey, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen);
res = RegGetValueW(subkey, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen);
RegCloseKey(subkey);
if (res != ERROR_SUCCESS)
goto cleanup;
......@@ -1805,7 +1801,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
else
{
dwBufLen = MAX_PATH + 8;
res = RegGetValueW(key, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen);
res = RegGetValueW(key, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen);
if (res != ERROR_SUCCESS)
goto cleanup;
}
......@@ -1830,7 +1826,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
*(ns) = '\0';
lstrcatW(filename, assemblyname);
*(ns) = '.';
lstrcatW(filename, wszDLL);
lstrcatW(filename, L".dll");
}
}
}
......
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