Implement basic version of PNP_CreateKey.
authorEric Kohl <eric.kohl@reactos.org>
Sun, 31 Jan 2010 19:44:02 +0000 (19:44 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 31 Jan 2010 19:44:02 +0000 (19:44 +0000)
svn path=/trunk/; revision=45361

reactos/base/services/umpnpmgr/umpnpmgr.c

index 7488400..8dc8a16 100644 (file)
@@ -831,8 +831,24 @@ DWORD PNP_CreateKey(
     DWORD samDesired,
     DWORD ulFlags)
 {
-    UNIMPLEMENTED;
-    return CR_CALL_NOT_IMPLEMENTED;
+    HKEY hKey = 0;
+
+    if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,
+                        pszSubKey,
+                        0,
+                        NULL,
+                        0,
+                        KEY_ALL_ACCESS,
+                        NULL,
+                        &hKey,
+                        NULL))
+        return CR_REGISTRY_ERROR;
+
+    /* FIXME: Set security key */
+
+    RegCloseKey(hKey);
+
+    return CR_SUCCESS;
 }