create registry key if it doesn't exist
This commit is contained in:
parent
3ad8a5bd0e
commit
7b7fefcad1
1 changed files with 10 additions and 2 deletions
|
@ -75,8 +75,16 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||||
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
LONG status =
|
LONG status =
|
||||||
RegOpenKeyExA(
|
RegCreateKeyExA(
|
||||||
HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32", 0L, KEY_WRITE, &hkey);
|
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)
|
if (status == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue