[ros-diffs] [hpoussin] 20189: Set the ConfigFlags value in registry
if not present
hpoussin at svn.reactos.com
hpoussin at svn.reactos.com
Thu Dec 15 15:15:35 CET 2005
Set the ConfigFlags value in registry if not present
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-15 13:48:26 UTC (rev
20188)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-15 14:15:18 UTC (rev
20189)
@@ -996,7 +996,7 @@
UNICODE_STRING KeyName;
HANDLE LogConfKey;
ULONG ResCount;
- ULONG ListSize;
+ ULONG ListSize, ResultLength;
NTSTATUS Status;
DPRINT("IopSetDeviceInstanceData() called\n");
@@ -1051,6 +1051,26 @@
ZwClose(LogConfKey);
}
+ /* Set the 'ConfigFlags' value */
+ RtlInitUnicodeString(&KeyName, L"ConfigFlags");
+ Status = ZwQueryValueKey(InstanceKey,
+ &KeyName,
+ KeyValueBasicInformation,
+ NULL,
+ 0,
+ &ResultLength);
+ if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
+ {
+ /* Write the default value */
+ ULONG DefaultConfigFlags = 0;
+ Status = ZwSetValueKey(InstanceKey,
+ &KeyName,
+ 0,
+ REG_DWORD,
+ &DefaultConfigFlags,
+ sizeof(DefaultConfigFlags));
+ }
+
#if 0
if (DeviceNode->PhysicalDeviceObject != NULL)
{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051215/669c5209/attachment.html
More information about the Ros-diffs
mailing list