1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

create registry key if it doesn't exist

This commit is contained in:
FunkyFr3sh 2023-09-26 19:35:12 +02:00
parent 3ad8a5bd0e
commit 7b7fefcad1

View File

@ -75,8 +75,16 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
HKEY hkey;
LONG status =
RegOpenKeyExA(
HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32", 0L, KEY_WRITE, &hkey);
RegCreateKeyExA(
HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32",
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE | KEY_QUERY_VALUE,
NULL,
&hkey,
NULL);
if (status == ERROR_SUCCESS)
{