Created more needed registry key in DllRegisterServer.

This commit is contained in:
Raphael Junqueira 2004-06-03 23:18:59 +00:00 committed by Alexandre Julliard
parent fa3544bbdf
commit 31f6cf32b8
1 changed files with 11 additions and 15 deletions

View File

@ -317,23 +317,20 @@ HRESULT WINAPI RSABASE_DllRegisterServer()
{ {
if (dp == REG_CREATED_NEW_KEY) if (dp == REG_CREATED_NEW_KEY)
{ {
static const WCHAR szImagePath[] = { 'I','m','a','g','e','P','a', static const WCHAR szImagePath[] = { 'I','m','a','g','e',' ','P','a','t','h',0 };
't','h',0 }; static const WCHAR szRSABase[] = { 'r','s','a','b','a','s','e','.','d','l','l',0 };
static const WCHAR szRSABase[] = { 'r','s','a','b','a','s','e','.', static const WCHAR szType[] = { 'T','y','p','e',0 };
'd','l','l',0 }; static const WCHAR szSignature[] = { 'S','i','g','n','a','t','u','r','e',0 };
static const WCHAR szType[] = { 'T','y','p','e',0 }; DWORD type = 1;
DWORD type = 1; DWORD sign = 0xdeadbeef;
RegSetValueExW(key, szImagePath, 0, REG_SZ, (LPBYTE)szRSABase, (lstrlenW(szRSABase) + 1) * sizeof(WCHAR));
RegSetValueExW(key, szImagePath, 0, REG_SZ, (LPBYTE)szRSABase, RegSetValueExW(key, szType, 0, REG_DWORD, (LPBYTE)&type, sizeof(type));
(lstrlenW(szRSABase) + 1) * sizeof(WCHAR)); RegSetValueExW(key, szSignature, 0, REG_DWORD, (LPBYTE)&sign, sizeof(sign));
RegSetValueExW(key, szType, 0, REG_DWORD, (LPBYTE)&type,
sizeof(type));
} }
RegCloseKey(key); RegCloseKey(key);
} }
if (apiRet == ERROR_SUCCESS) if (apiRet == ERROR_SUCCESS)
apiRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szRSAKey2, 0, NULL, apiRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szRSAKey2, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &dp);
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &dp);
if (apiRet == ERROR_SUCCESS) if (apiRet == ERROR_SUCCESS)
{ {
if (dp == REG_CREATED_NEW_KEY) if (dp == REG_CREATED_NEW_KEY)
@ -344,8 +341,7 @@ HRESULT WINAPI RSABASE_DllRegisterServer()
'r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r', 'r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r',
'o','v','i','d','e','r',' ','v','1','.','0',0 }; 'o','v','i','d','e','r',' ','v','1','.','0',0 };
RegSetValueExW(key, szName, 0, REG_SZ, (LPBYTE)szRSAName, RegSetValueExW(key, szName, 0, REG_SZ, (LPBYTE)szRSAName, sizeof(szRSAName));
sizeof(szRSAName));
} }
RegCloseKey(key); RegCloseKey(key);
} }