ReactOS 0.4.15-dev-8408-g466a198
plugplay.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for plugplay.c:

Go to the source code of this file.

Classes

struct  _PNP_EVENT_ENTRY
 
struct  _IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT
 

Macros

#define NDEBUG
 

Typedefs

typedef struct _PNP_EVENT_ENTRY PNP_EVENT_ENTRY
 
typedef struct _PNP_EVENT_ENTRYPPNP_EVENT_ENTRY
 
typedef struct _IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT
 
typedef struct _IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXTPIOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT
 

Functions

NTSTATUS IopSetDeviceInstanceData (HANDLE InstanceKey, PDEVICE_NODE DeviceNode)
 
NTSTATUS IopInitPlugPlayEvents (VOID)
 
NTSTATUS IopQueueDeviceChangeEvent (_In_ const GUID *EventGuid, _In_ const GUID *InterfaceClassGuid, _In_ PUNICODE_STRING SymbolicLinkName)
 
NTSTATUS IopQueueDeviceInstallEvent (_In_ const GUID *EventGuid, _In_ PUNICODE_STRING DeviceId)
 
NTSTATUS IopQueueTargetDeviceEvent (const GUID *Guid, PUNICODE_STRING DeviceIds)
 
NTSTATUS IopFindDeviceInstanceTraverse (_In_ PDEVICE_NODE DeviceNode, _Inout_ PVOID Context)
 
PDEVICE_OBJECT IopGetDeviceObjectFromDeviceInstance (PUNICODE_STRING DeviceInstance)
 
static NTSTATUS IopCaptureUnicodeString (PUNICODE_STRING DstName, PUNICODE_STRING SrcName)
 
static NTSTATUS PiControlInitializeDevice (_In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData)
 
static NTSTATUS IopRemovePlugPlayEvent (_In_ PPLUGPLAY_CONTROL_USER_RESPONSE_DATA ResponseData)
 
static NTSTATUS IopGetInterfaceDeviceList (PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA DeviceList)
 
static NTSTATUS IopGetDeviceProperty (PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData)
 
static NTSTATUS IopGetRelatedDevice (PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA RelatedDeviceData)
 
static BOOLEAN PiIsDevNodeStarted (_In_ PDEVICE_NODE DeviceNode)
 
static ULONG IopGetDeviceNodeStatus (PDEVICE_NODE DeviceNode)
 
static NTSTATUS IopDeviceStatus (PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
 
static NTSTATUS IopGetDeviceRelations (PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData)
 
static NTSTATUS IopGetDeviceDepth (PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
 
static NTSTATUS PiControlSyncDeviceAction (_In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceData, _In_ PLUGPLAY_CONTROL_CLASS ControlClass)
 
static NTSTATUS PiControlQueryRemoveDevice (_In_ PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA ControlData)
 
NTSTATUS NTAPI NtGetPlugPlayEvent (IN ULONG Reserved1, IN ULONG Reserved2, OUT PPLUGPLAY_EVENT_BLOCK Buffer, IN ULONG BufferSize)
 
NTSTATUS NTAPI NtPlugPlayControl (IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, IN OUT PVOID Buffer, IN ULONG BufferLength)
 

Variables

static LIST_ENTRY IopPnpEventQueueHead
 
static KEVENT IopPnpNotifyEvent
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file plugplay.c.

Typedef Documentation

◆ IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT

◆ PIOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT

◆ PNP_EVENT_ENTRY

◆ PPNP_EVENT_ENTRY

Function Documentation

◆ IopCaptureUnicodeString()

static NTSTATUS IopCaptureUnicodeString ( PUNICODE_STRING  DstName,
PUNICODE_STRING  SrcName 
)
static

Definition at line 240 of file plugplay.c.

241{
243 volatile UNICODE_STRING Name;
244
245 Name.Buffer = NULL;
247 {
248 Name.Length = SrcName->Length;
249 Name.MaximumLength = SrcName->MaximumLength;
250 if (Name.Length > Name.MaximumLength)
251 {
254 }
255
256 if (Name.MaximumLength)
257 {
258 ProbeForRead(SrcName->Buffer,
259 Name.MaximumLength,
260 sizeof(WCHAR));
261 Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
262 if (Name.Buffer == NULL)
263 {
266 }
267
268 memcpy(Name.Buffer, SrcName->Buffer, Name.MaximumLength);
269 }
270
271 *DstName = Name;
272 }
274 {
275 if (Name.Buffer)
276 {
277 ExFreePool(Name.Buffer);
278 }
280 }
281 _SEH2_END;
282
283 return Status;
284}
struct NameRec_ * Name
Definition: cdprocs.h:460
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define _SEH2_LEAVE
Definition: filesup.c:20
Status
Definition: gdiplustypes.h:25
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define STATUS_SUCCESS
Definition: shellext.h:65
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by IopDeviceStatus(), IopGetDeviceDepth(), IopGetDeviceProperty(), IopGetDeviceRelations(), IopGetInterfaceDeviceList(), IopGetRelatedDevice(), PiControlInitializeDevice(), PiControlQueryRemoveDevice(), and PiControlSyncDeviceAction().

◆ IopDeviceStatus()

static NTSTATUS IopDeviceStatus ( PPLUGPLAY_CONTROL_STATUS_DATA  StatusData)
static

Definition at line 922 of file plugplay.c.

923{
926 ULONG Operation = 0;
927 ULONG DeviceStatus = 0;
928 ULONG DeviceProblem = 0;
931
932 DPRINT("IopDeviceStatus() called\n");
933
935 if (!NT_SUCCESS(Status))
936 {
937 return Status;
938 }
939
940 DPRINT("Device name: '%wZ'\n", &DeviceInstance);
941
943 {
944 Operation = StatusData->Operation;
946 {
947 DeviceStatus = StatusData->DeviceStatus;
948 DeviceProblem = StatusData->DeviceProblem;
949 }
950 }
952 {
953 if (DeviceInstance.Buffer != NULL)
954 {
956 }
958 }
959 _SEH2_END;
960
961 /* Get the device object */
963 if (DeviceInstance.Buffer != NULL)
964 {
966 }
967 if (DeviceObject == NULL)
968 {
970 }
971
973
974 switch (Operation)
975 {
977 DPRINT("Get status data\n");
978 DeviceStatus = IopGetDeviceNodeStatus(DeviceNode);
979 DeviceProblem = DeviceNode->Problem;
980 break;
981
983 DPRINT1("Set status data is NOT SUPPORTED\n");
984 break;
985
987 DPRINT1("FIXME: Clear status data!\n");
988 break;
989 }
990
992
994 {
996 {
997 StatusData->DeviceStatus = DeviceStatus;
998 StatusData->DeviceProblem = DeviceProblem;
999 }
1001 {
1003 }
1004 _SEH2_END;
1005 }
1006
1007 return Status;
1008}
@ DeviceNode
Definition: Node.h:9
#define DPRINT1
Definition: precomp.h:8
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
static const WCHAR DeviceInstance[]
Definition: interface.c:28
FP_OP Operation
Definition: fpcontrol.c:150
#define PNP_SET_DEVICE_STATUS
Definition: cmtypes.h:60
#define PNP_CLEAR_DEVICE_STATUS
Definition: cmtypes.h:61
#define PNP_GET_DEVICE_STATUS
Definition: cmtypes.h:59
PDEVICE_NODE FASTCALL IopGetDeviceNode(IN PDEVICE_OBJECT DeviceObject)
PDEVICE_OBJECT IopGetDeviceObjectFromDeviceInstance(PUNICODE_STRING DeviceInstance)
Definition: plugplay.c:206
static NTSTATUS IopCaptureUnicodeString(PUNICODE_STRING DstName, PUNICODE_STRING SrcName)
Definition: plugplay.c:240
static ULONG IopGetDeviceNodeStatus(PDEVICE_NODE DeviceNode)
Definition: plugplay.c:877
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
#define DPRINT
Definition: sndvol32.h:73
UNICODE_STRING DeviceInstance
Definition: cmtypes.h:525
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by NtPlugPlayControl().

◆ IopFindDeviceInstanceTraverse()

NTSTATUS IopFindDeviceInstanceTraverse ( _In_ PDEVICE_NODE  DeviceNode,
_Inout_ PVOID  Context 
)

Definition at line 186 of file plugplay.c.

189{
191
192 if (RtlEqualUnicodeString(&DeviceNode->InstancePath,
193 DeviceInstanceContext->InstancePath, TRUE))
194 {
195 ObReferenceObject(DeviceNode->PhysicalDeviceObject);
196 DeviceInstanceContext->DeviceObject = DeviceNode->PhysicalDeviceObject;
197
198 /* Stop enumeration */
199 return STATUS_UNSUCCESSFUL;
200 }
201
202 return STATUS_SUCCESS;
203}
#define TRUE
Definition: types.h:120
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define ObReferenceObject
Definition: obfuncs.h:204

Referenced by IopGetDeviceObjectFromDeviceInstance().

◆ IopGetDeviceDepth()

static NTSTATUS IopGetDeviceDepth ( PPLUGPLAY_CONTROL_DEPTH_DATA  DepthData)
static

Definition at line 1169 of file plugplay.c.

1170{
1175
1176 DPRINT("IopGetDeviceDepth() called\n");
1177 DPRINT("Device name: %wZ\n", &DepthData->DeviceInstance);
1178
1180 if (!NT_SUCCESS(Status))
1181 {
1182 return Status;
1183 }
1184
1185 /* Get the device object */
1187 if (DeviceInstance.Buffer != NULL)
1188 {
1189 ExFreePool(DeviceInstance.Buffer);
1190 }
1191 if (DeviceObject == NULL)
1192 {
1193 return STATUS_NO_SUCH_DEVICE;
1194 }
1195
1197
1198 _SEH2_TRY
1199 {
1200 DepthData->Depth = DeviceNode->Level;
1201 }
1203 {
1205 }
1206 _SEH2_END;
1207
1209
1210 return Status;
1211}
UNICODE_STRING DeviceInstance
Definition: cmtypes.h:534

Referenced by NtPlugPlayControl().

◆ IopGetDeviceNodeStatus()

static ULONG IopGetDeviceNodeStatus ( PDEVICE_NODE  DeviceNode)
static

Definition at line 877 of file plugplay.c.

878{
880
881 if (DeviceNode->Parent == IopRootDeviceNode)
883
884 // FIXME: review for deleted and removed states
887
890
891 if (DeviceNode->UserFlags & DNUF_WILL_BE_REMOVED)
893
894 if (DeviceNode->Flags & DNF_HAS_PROBLEM)
896
899
900 if (DeviceNode->Flags & DNF_DRIVER_BLOCKED)
902
905
908
909 if (DeviceNode->Flags & DNF_LEGACY_DRIVER)
911
912 if (DeviceNode->UserFlags & DNUF_DONT_SHOW_IN_UI)
914
915 if (!(DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE))
917
918 return Output;
919}
#define DN_NT_DRIVER
Definition: cfg.h:142
#define DN_NO_SHOW_IN_DM
Definition: cfg.h:148
#define DN_NT_ENUMERATOR
Definition: cfg.h:141
#define DN_DRIVER_LOADED
Definition: cfg.h:119
#define DN_DISABLEABLE
Definition: cfg.h:131
#define DN_DRIVER_BLOCKED
Definition: cfg.h:154
#define DN_CHILD_WITH_INVALID_ID
Definition: cfg.h:156
#define DN_HAS_PROBLEM
Definition: cfg.h:128
#define DN_STARTED
Definition: cfg.h:121
#define DN_WILL_BE_REMOVED
Definition: cfg.h:136
#define DN_ROOT_ENUMERATED
Definition: cfg.h:118
#define DN_LEGACY_DRIVER
Definition: cfg.h:155
#define DN_PRIVATE_PROBLEM
Definition: cfg.h:133
#define DNUF_WILL_BE_REMOVED
Definition: iotypes.h:208
#define DNF_LEGACY_DRIVER
Definition: iotypes.h:182
@ DeviceNodeDriversAdded
Definition: iotypes.h:537
#define DNUF_NOT_DISABLEABLE
Definition: iotypes.h:211
#define DNF_HAS_PRIVATE_PROBLEM
Definition: iotypes.h:184
#define DNUF_DONT_SHOW_IN_UI
Definition: iotypes.h:209
#define DNF_CHILD_WITH_INVALID_ID
Definition: iotypes.h:191
#define DNF_DRIVER_BLOCKED
Definition: iotypes.h:190
#define DNF_HAS_PROBLEM
Definition: iotypes.h:183
PDEVICE_NODE IopRootDeviceNode
Definition: devnode.c:18
static BOOLEAN PiIsDevNodeStarted(_In_ PDEVICE_NODE DeviceNode)
Definition: plugplay.c:862
@ Output
Definition: arc.h:85

Referenced by IopDeviceStatus().

◆ IopGetDeviceObjectFromDeviceInstance()

PDEVICE_OBJECT IopGetDeviceObjectFromDeviceInstance ( PUNICODE_STRING  DeviceInstance)

Definition at line 206 of file plugplay.c.

207{
209 IOP_FIND_DEVICE_INSTANCE_TRAVERSE_CONTEXT DeviceInstanceContext;
210
211 if (IopRootDeviceNode == NULL)
212 return NULL;
213
214 if (DeviceInstance == NULL ||
215 DeviceInstance->Length == 0)
216 {
218 {
221 }
222 else
223 return NULL;
224 }
225
226 /* Traverse the device tree to find the matching device node */
227 DeviceInstanceContext.InstancePath = DeviceInstance;
228 DeviceInstanceContext.DeviceObject = NULL;
232 &DeviceInstanceContext);
234
235 /* In case of error or instance not found, this will still be NULL from above. */
236 return DeviceInstanceContext.DeviceObject;
237}
#define IopInitDeviceTreeTraverseContext( _DeviceTreeTraverseContext, _DeviceNode, _Action, _Context)
Definition: io.h:229
NTSTATUS IopTraverseDeviceTree(PDEVICETREE_TRAVERSE_CONTEXT Context)
NTSTATUS IopFindDeviceInstanceTraverse(_In_ PDEVICE_NODE DeviceNode, _Inout_ PVOID Context)
Definition: plugplay.c:186
PDEVICE_OBJECT PhysicalDeviceObject
Definition: iotypes.h:1005

Referenced by IopDeviceStatus(), IopGetDeviceDepth(), IopGetDeviceProperty(), IopGetDeviceRelations(), IopGetInterfaceDeviceList(), IopGetRelatedDevice(), IopInitializeBuiltinDriver(), IoSetDeviceInterfaceState(), PiControlInitializeDevice(), PiControlQueryRemoveDevice(), PiControlSyncDeviceAction(), and PiInitializeDevNode().

◆ IopGetDeviceProperty()

static NTSTATUS IopGetDeviceProperty ( PPLUGPLAY_CONTROL_PROPERTY_DATA  PropertyData)
static

Definition at line 491 of file plugplay.c.

492{
501
502 DPRINT("IopGetDeviceProperty() called\n");
503 DPRINT("Device name: %wZ\n", &PropertyData->DeviceInstance);
504
506 if (!NT_SUCCESS(Status))
507 {
508 return Status;
509 }
510
512 {
513 Property = PropertyData->Property;
514 BufferSize = PropertyData->BufferSize;
517 sizeof(UCHAR));
518 }
520 {
521 if (DeviceInstance.Buffer != NULL)
522 {
524 }
526 }
527 _SEH2_END;
528
529 /* Get the device object */
531 if (DeviceInstance.Buffer != NULL)
532 {
534 }
535 if (DeviceObject == NULL)
536 {
538 }
539
541 if (Buffer == NULL)
542 {
545 }
546
547
548 DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->DeviceNode;
549
551 {
552 if (BufferSize < sizeof(CM_POWER_DATA))
553 {
554 BufferSize = 0;
556 }
557 else
558 {
560 PCM_POWER_DATA PowerData;
563
564 PowerData = (PCM_POWER_DATA)Buffer;
565 RtlZeroMemory(PowerData, sizeof(CM_POWER_DATA));
566 PowerData->PD_Size = sizeof(CM_POWER_DATA);
567
570 DeviceCapabilities.Version = 1;
571 DeviceCapabilities.Address = -1;
572 DeviceCapabilities.UINumber = -1;
573
574 Stack.Parameters.DeviceCapabilities.Capabilities = &DeviceCapabilities;
575
579 &Stack);
580 if (NT_SUCCESS(Status))
581 {
582 DPRINT("Got device capabiliities\n");
583
584 PowerData->PD_MostRecentPowerState = PowerDeviceD0; // FIXME
585 if (DeviceCapabilities.DeviceD1)
587 if (DeviceCapabilities.DeviceD2)
589 if (DeviceCapabilities.WakeFromD0)
591 if (DeviceCapabilities.WakeFromD1)
593 if (DeviceCapabilities.WakeFromD2)
595 if (DeviceCapabilities.WakeFromD3)
597 if (DeviceCapabilities.WarmEjectSupported)
599 PowerData->PD_D1Latency = DeviceCapabilities.D1Latency;
600 PowerData->PD_D2Latency = DeviceCapabilities.D2Latency;
601 PowerData->PD_D3Latency = DeviceCapabilities.D3Latency;
603 &DeviceCapabilities.DeviceState,
604 sizeof(DeviceCapabilities.DeviceState));
605 PowerData->PD_DeepestSystemWake = DeviceCapabilities.SystemWake;
606 }
607 else
608 {
609 DPRINT("IRP_MN_QUERY_CAPABILITIES failed (Status 0x%08lx)\n", Status);
610
613 }
614 }
615 }
617 {
619 BufferSize = 0;
621 }
623 {
624 if (BufferSize < sizeof(DeviceNode->HardwareRemovalPolicy))
625 {
626 BufferSize = 0;
628 }
629 else
630 {
631 BufferSize = sizeof(DeviceNode->HardwareRemovalPolicy);
633 &DeviceNode->HardwareRemovalPolicy,
634 BufferSize);
635 }
636 }
637 else
638 {
639 switch (Property)
640 {
643 break;
644
647 break;
648
651 break;
652
655 break;
656
659 break;
660
663 break;
664
667 break;
668
671 break;
672
675 break;
676
677#if (WINVER >= _WIN32_WINNT_WS03)
680 BufferSize = 0;
682 break;
683#endif
684
685#if (WINVER >= _WIN32_WINNT_WIN7)
688 break;
689#endif
690
691 default:
692 BufferSize = 0;
694 break;
695 }
696
697 if (Status == STATUS_SUCCESS)
698 {
702 Buffer,
703 &BufferSize);
704 }
705 }
706
708
709 if (NT_SUCCESS(Status))
710 {
712 {
714 PropertyData->BufferSize = BufferSize;
715 }
717 {
719 }
720 _SEH2_END;
721 }
722
724 return Status;
725}
struct CM_Power_Data_s * PCM_POWER_DATA
#define PDCAP_WARM_EJECT_SUPPORTED
Definition: advprop.cpp:44
#define PDCAP_D2_SUPPORTED
Definition: advprop.cpp:38
struct CM_Power_Data_s CM_POWER_DATA
#define PDCAP_D0_SUPPORTED
Definition: advprop.cpp:36
#define PDCAP_D1_SUPPORTED
Definition: advprop.cpp:37
#define PDCAP_WAKE_FROM_D3_SUPPORTED
Definition: advprop.cpp:43
#define PDCAP_WAKE_FROM_D1_SUPPORTED
Definition: advprop.cpp:41
#define PDCAP_WAKE_FROM_D0_SUPPORTED
Definition: advprop.cpp:40
#define PDCAP_D3_SUPPORTED
Definition: advprop.cpp:39
#define PDCAP_WAKE_FROM_D2_SUPPORTED
Definition: advprop.cpp:42
#define UNIMPLEMENTED
Definition: debug.h:118
Definition: bufpool.h:45
#define BufferSize
Definition: mmc.h:75
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
_In_ WDFDEVICE _In_ PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define PNP_PROPERTY_UI_NUMBER
Definition: cmtypes.h:34
#define PNP_PROPERTY_REMOVAL_POLICY
Definition: cmtypes.h:40
#define PNP_PROPERTY_POWER_DATA
Definition: cmtypes.h:39
#define PNP_PROPERTY_ENUMERATOR_NAME
Definition: cmtypes.h:43
#define PNP_PROPERTY_PHYSICAL_DEVICE_OBJECT_NAME
Definition: cmtypes.h:35
#define PNP_PROPERTY_INSTALL_STATE
Definition: cmtypes.h:45
#define PNP_PROPERTY_LOCATION_PATHS
Definition: cmtypes.h:46
#define PNP_PROPERTY_REMOVAL_POLICY_HARDWARE_DEFAULT
Definition: cmtypes.h:44
#define PNP_PROPERTY_REMOVAL_POLICY_OVERRIDE
Definition: cmtypes.h:41
#define PNP_PROPERTY_LEGACYBUSTYPE
Definition: cmtypes.h:37
#define PNP_PROPERTY_BUSTYPEGUID
Definition: cmtypes.h:36
#define PNP_PROPERTY_ADDRESS
Definition: cmtypes.h:42
#define PNP_PROPERTY_BUSNUMBER
Definition: cmtypes.h:38
#define PNP_PROPERTY_CONTAINERID
Definition: cmtypes.h:47
struct _EXTENDED_DEVOBJ_EXTENSION * PEXTENDED_DEVOBJ_EXTENSION
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack)
@ PowerDeviceD0
Definition: ntpoapi.h:49
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:1382
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
SYSTEM_POWER_STATE PD_DeepestSystemWake
Definition: advprop.cpp:55
DEVICE_POWER_STATE PD_PowerStateMapping[PowerSystemMaximum]
Definition: advprop.cpp:54
ULONG PD_D2Latency
Definition: advprop.cpp:52
ULONG PD_Capabilities
Definition: advprop.cpp:50
ULONG PD_D1Latency
Definition: advprop.cpp:51
DEVICE_POWER_STATE PD_MostRecentPowerState
Definition: advprop.cpp:49
ULONG PD_D3Latency
Definition: advprop.cpp:53
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfdevice.h:3769
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
#define DeviceCapabilities
Definition: wingdi.h:4449
DEVICE_CAPABILITIES
Definition: iotypes.h:965
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1194
@ DevicePropertyAddress
Definition: iotypes.h:1211
@ DevicePropertyEnumeratorName
Definition: iotypes.h:1210
@ DevicePropertyInstallState
Definition: iotypes.h:1213
@ DevicePropertyUINumber
Definition: iotypes.h:1212
@ DevicePropertyBusNumber
Definition: iotypes.h:1209
@ DevicePropertyRemovalPolicy
Definition: iotypes.h:1214
@ DevicePropertyPhysicalDeviceObjectName
Definition: iotypes.h:1206
@ DevicePropertyLegacyBusType
Definition: iotypes.h:1208
@ DevicePropertyContainerID
Definition: iotypes.h:1217
@ DevicePropertyBusTypeGuid
Definition: iotypes.h:1207
#define IRP_MN_QUERY_CAPABILITIES
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by NtPlugPlayControl().

◆ IopGetDeviceRelations()

static NTSTATUS IopGetDeviceRelations ( PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA  RelationsData)
static

Definition at line 1012 of file plugplay.c.

1013{
1018 PDEVICE_RELATIONS DeviceRelations = NULL;
1019 PDEVICE_OBJECT ChildDeviceObject;
1020 PDEVICE_NODE ChildDeviceNode;
1021 ULONG i;
1022 ULONG Relations;
1024 ULONG BufferLeft;
1025 PWCHAR Buffer, Ptr;
1027
1028 DPRINT("IopGetDeviceRelations() called\n");
1029 DPRINT("Device name: %wZ\n", &RelationsData->DeviceInstance);
1030 DPRINT("Relations: %lu\n", RelationsData->Relations);
1031 DPRINT("BufferSize: %lu\n", RelationsData->BufferSize);
1032 DPRINT("Buffer: %p\n", RelationsData->Buffer);
1033
1034 _SEH2_TRY
1035 {
1036 Relations = RelationsData->Relations;
1037 BufferSize = RelationsData->BufferSize;
1038 Buffer = RelationsData->Buffer;
1039
1041 }
1043 {
1045 }
1046 _SEH2_END;
1047
1049 if (!NT_SUCCESS(Status))
1050 {
1051 DPRINT1("IopCaptureUnicodeString() failed (Status 0x%08lx)\n", Status);
1052 return Status;
1053 }
1054
1055 /* Get the device object */
1057 if (DeviceObject == NULL)
1058 {
1059 DPRINT1("IopGetDeviceObjectFromDeviceInstance() returned NULL\n");
1061 goto done;
1062 }
1063
1064 switch (Relations)
1065 {
1067 Stack.Parameters.QueryDeviceRelations.Type = EjectionRelations;
1068 break;
1069
1071 Stack.Parameters.QueryDeviceRelations.Type = RemovalRelations;
1072 break;
1073
1075 Stack.Parameters.QueryDeviceRelations.Type = PowerRelations;
1076 break;
1077
1078 case PNP_BUS_RELATIONS:
1079 Stack.Parameters.QueryDeviceRelations.Type = BusRelations;
1080 break;
1081
1082 default:
1084 goto done;
1085 }
1086
1090 &Stack);
1091 if (!NT_SUCCESS(Status))
1092 {
1093 DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
1094 goto done;
1095 }
1096
1097 DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information;
1098
1099 DPRINT("Found %d device relations\n", DeviceRelations->Count);
1100
1101 _SEH2_TRY
1102 {
1103 RequiredSize = 0;
1104 BufferLeft = BufferSize;
1105 Ptr = Buffer;
1106
1107 for (i = 0; i < DeviceRelations->Count; i++)
1108 {
1109 ChildDeviceObject = DeviceRelations->Objects[i];
1110
1111 ChildDeviceNode = IopGetDeviceNode(ChildDeviceObject);
1112 if (ChildDeviceNode)
1113 {
1114 DPRINT("Device instance: %wZ\n", &ChildDeviceNode->InstancePath);
1115 DPRINT("RequiredSize: %hu\n", ChildDeviceNode->InstancePath.Length + sizeof(WCHAR));
1116
1117 if (Ptr != NULL)
1118 {
1119 if (BufferLeft < ChildDeviceNode->InstancePath.Length + 2 * sizeof(WCHAR))
1120 {
1122 break;
1123 }
1124
1126 ChildDeviceNode->InstancePath.Buffer,
1127 ChildDeviceNode->InstancePath.Length);
1128 Ptr = (PWCHAR)((ULONG_PTR)Ptr + ChildDeviceNode->InstancePath.Length);
1129 *Ptr = UNICODE_NULL;
1130 Ptr = (PWCHAR)((ULONG_PTR)Ptr + sizeof(WCHAR));
1131
1132 BufferLeft -= (ChildDeviceNode->InstancePath.Length + sizeof(WCHAR));
1133 }
1134
1135 RequiredSize += (ChildDeviceNode->InstancePath.Length + sizeof(WCHAR));
1136 }
1137 }
1138
1139 if (Ptr != NULL && BufferLeft >= sizeof(WCHAR))
1140 *Ptr = UNICODE_NULL;
1141
1142 if (RequiredSize > 0)
1143 RequiredSize += sizeof(WCHAR);
1144
1145 DPRINT("BufferSize: %lu RequiredSize: %lu\n", RelationsData->BufferSize, RequiredSize);
1146
1147 RelationsData->BufferSize = RequiredSize;
1148 }
1150 {
1152 }
1153 _SEH2_END;
1154
1155done:
1156 if (DeviceRelations != NULL)
1157 ExFreePool(DeviceRelations);
1158
1159 if (DeviceObject != NULL)
1161
1162 if (DeviceInstance.Buffer != NULL)
1163 ExFreePool(DeviceInstance.Buffer);
1164
1165 return Status;
1166}
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define PNP_POWER_RELATIONS
Definition: cmtypes.h:68
#define PNP_BUS_RELATIONS
Definition: cmtypes.h:69
#define PNP_REMOVAL_RELATIONS
Definition: cmtypes.h:67
#define PNP_EJECT_RELATIONS
Definition: cmtypes.h:66
#define UNICODE_NULL
UNICODE_STRING InstancePath
Definition: iotypes.h:1008
PDEVICE_OBJECT Objects[1]
Definition: iotypes.h:2163
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint16_t * PWCHAR
Definition: typedefs.h:56
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439
@ EjectionRelations
Definition: iotypes.h:2153
@ RemovalRelations
Definition: iotypes.h:2155
@ BusRelations
Definition: iotypes.h:2152
@ PowerRelations
Definition: iotypes.h:2154
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_RELATIONS
char CHAR
Definition: xmlstorage.h:175

Referenced by NtPlugPlayControl().

◆ IopGetInterfaceDeviceList()

static NTSTATUS IopGetInterfaceDeviceList ( PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA  DeviceList)
static

Definition at line 413 of file plugplay.c.

414{
419 GUID FilterGuid;
420 PZZWSTR SymbolicLinkList = NULL, LinkList;
422
424 {
426
427 ProbeForRead(StackList.FilterGuid, sizeof(GUID), sizeof(UCHAR));
428 RtlCopyMemory(&FilterGuid, StackList.FilterGuid, sizeof(GUID));
429
430 if (StackList.Buffer != NULL && StackList.BufferSize != 0)
431 {
432 ProbeForWrite(StackList.Buffer, StackList.BufferSize, sizeof(UCHAR));
433 }
434 }
436 {
438 }
439 _SEH2_END;
440
442 if (NT_SUCCESS(Status))
443 {
444 /* Get the device object */
446 if (DeviceInstance.Buffer != NULL)
447 {
449 }
450 }
451
454
455 if (!NT_SUCCESS(Status))
456 {
457 /* failed */
458 return Status;
459 }
460
461 LinkList = SymbolicLinkList;
463 {
465 }
466 TotalLength = ((SymbolicLinkList - LinkList + 1) * sizeof(WCHAR));
467
469 {
470 if (StackList.Buffer != NULL &&
471 StackList.BufferSize >= TotalLength)
472 {
473 // We've already probed the buffer for writing above.
474 RtlCopyMemory(StackList.Buffer, LinkList, TotalLength);
475 }
476
477 DeviceList->BufferSize = TotalLength;
478 }
480 {
481 ExFreePool(LinkList);
483 }
484 _SEH2_END;
485
486 ExFreePool(LinkList);
487 return STATUS_SUCCESS;
488}
PDEVICE_LIST DeviceList
Definition: utils.c:27
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_NullNull_terminated_ WCHAR * PZZWSTR
Definition: ntbasedef.h:420
NTSTATUS NTAPI IoGetDeviceInterfaces(IN CONST GUID *InterfaceClassGuid, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, IN ULONG Flags, OUT PWSTR *SymbolicLinkList)
Definition: deviface.c:454
ULONG_PTR SIZE_T
Definition: typedefs.h:80
_In_ ULONG TotalLength
Definition: usbdlib.h:158
_In_opt_ PDEVICE_OBJECT _In_ ULONG _Outptr_result_nullonfailure_ _At_ * SymbolicLinkList(return==0, __drv_allocatesMem(Mem))) PZZWSTR *SymbolicLinkList

Referenced by NtPlugPlayControl().

◆ IopGetRelatedDevice()

static NTSTATUS IopGetRelatedDevice ( PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA  RelatedDeviceData)
static

Definition at line 729 of file plugplay.c.

730{
731 UNICODE_STRING RootDeviceName;
734 PDEVICE_NODE RelatedDeviceNode;
735 UNICODE_STRING TargetDeviceInstance;
737 ULONG Relation = 0;
739
740 DPRINT("IopGetRelatedDevice() called\n");
741 DPRINT("Device name: %wZ\n", &RelatedDeviceData->TargetDeviceInstance);
742
743 Status = IopCaptureUnicodeString(&TargetDeviceInstance, &RelatedDeviceData->TargetDeviceInstance);
744 if (!NT_SUCCESS(Status))
745 {
746 return Status;
747 }
748
750 {
751 Relation = RelatedDeviceData->Relation;
752 MaximumLength = RelatedDeviceData->RelatedDeviceInstanceLength;
753 ProbeForWrite(RelatedDeviceData->RelatedDeviceInstance,
755 sizeof(WCHAR));
756 }
758 {
759 if (TargetDeviceInstance.Buffer != NULL)
760 {
761 ExFreePool(TargetDeviceInstance.Buffer);
762 }
764 }
765 _SEH2_END;
766
767 RtlInitUnicodeString(&RootDeviceName,
768 L"HTREE\\ROOT\\0");
769 if (RtlEqualUnicodeString(&TargetDeviceInstance,
770 &RootDeviceName,
771 TRUE))
772 {
774 if (TargetDeviceInstance.Buffer != NULL)
775 {
776 ExFreePool(TargetDeviceInstance.Buffer);
777 }
778 }
779 else
780 {
781 /* Get the device object */
782 DeviceObject = IopGetDeviceObjectFromDeviceInstance(&TargetDeviceInstance);
783 if (TargetDeviceInstance.Buffer != NULL)
784 {
785 ExFreePool(TargetDeviceInstance.Buffer);
786 }
787 if (DeviceObject == NULL)
789
790 DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->DeviceNode;
791 }
792
793 switch (Relation)
794 {
796 RelatedDeviceNode = DeviceNode->Parent;
797 break;
798
800 RelatedDeviceNode = DeviceNode->Child;
801 break;
802
804 RelatedDeviceNode = DeviceNode->Sibling;
805 break;
806
807 default:
808 if (DeviceObject != NULL)
809 {
811 }
812
814 }
815
816 if (RelatedDeviceNode == NULL)
817 {
818 if (DeviceObject)
819 {
821 }
822
824 }
825
826 if (RelatedDeviceNode->InstancePath.Length > MaximumLength)
827 {
828 if (DeviceObject)
829 {
831 }
832
834 }
835
836 /* Copy related device instance name */
838 {
839 RtlCopyMemory(RelatedDeviceData->RelatedDeviceInstance,
840 RelatedDeviceNode->InstancePath.Buffer,
841 RelatedDeviceNode->InstancePath.Length);
842 RelatedDeviceData->RelatedDeviceInstanceLength = RelatedDeviceNode->InstancePath.Length;
843 }
845 {
847 }
848 _SEH2_END;
849
850 if (DeviceObject != NULL)
851 {
853 }
854
855 DPRINT("IopGetRelatedDevice() done\n");
856
857 return Status;
858}
#define PNP_GET_SIBLING_DEVICE
Definition: cmtypes.h:54
#define PNP_GET_PARENT_DEVICE
Definition: cmtypes.h:52
#define PNP_GET_CHILD_DEVICE
Definition: cmtypes.h:53
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define L(x)
Definition: ntvdm.h:50
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Referenced by NtPlugPlayControl().

◆ IopInitPlugPlayEvents()

NTSTATUS IopInitPlugPlayEvents ( VOID  )

Definition at line 40 of file plugplay.c.

41{
43
46 FALSE);
47
48 return STATUS_SUCCESS;
49}
#define FALSE
Definition: types.h:117
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
@ SynchronizationEvent
static LIST_ENTRY IopPnpEventQueueHead
Definition: plugplay.c:30
static KEVENT IopPnpNotifyEvent
Definition: plugplay.c:31

Referenced by IopInitializePlugPlayServices().

◆ IopQueueDeviceChangeEvent()

NTSTATUS IopQueueDeviceChangeEvent ( _In_ const GUID EventGuid,
_In_ const GUID InterfaceClassGuid,
_In_ PUNICODE_STRING  SymbolicLinkName 
)

Definition at line 52 of file plugplay.c.

56{
57 PPNP_EVENT_ENTRY EventEntry;
59 ULONG TotalSize;
60
61 /* Allocate a big enough buffer */
62 Copy.Length = 0;
63 Copy.MaximumLength = SymbolicLinkName->Length + sizeof(UNICODE_NULL);
64 TotalSize =
66 Copy.MaximumLength;
67
68 EventEntry = ExAllocatePool(NonPagedPool,
69 TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
70 if (!EventEntry)
72 RtlZeroMemory(EventEntry, TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
73
74 /* Fill the buffer with the event GUID */
75 RtlCopyMemory(&EventEntry->Event.EventGuid, EventGuid, sizeof(GUID));
77 EventEntry->Event.TotalSize = TotalSize;
78
79 /* Fill the interface class GUID */
80 RtlCopyMemory(&EventEntry->Event.DeviceClass.ClassGuid, InterfaceClassGuid, sizeof(GUID));
81
82 /* Fill the symbolic link name */
83 RtlCopyMemory(&EventEntry->Event.DeviceClass.SymbolicLinkName,
84 SymbolicLinkName->Buffer, SymbolicLinkName->Length);
85 EventEntry->Event.DeviceClass.SymbolicLinkName[SymbolicLinkName->Length / sizeof(WCHAR)] = UNICODE_NULL;
86
88 &EventEntry->ListEntry);
90 0,
91 FALSE);
92
93 return STATUS_SUCCESS;
94}
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
#define InsertHeadList(ListHead, Entry)
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
_Must_inspect_result_ _In_ WDFDEVICE _In_ REFGUID EventGuid
@ DeviceClassChangeEvent
Definition: cmtypes.h:258
WCHAR SymbolicLinkName[ANYSIZE_ARRAY]
Definition: cmtypes.h:416
PLUGPLAY_EVENT_CATEGORY EventCategory
Definition: cmtypes.h:406
struct _PLUGPLAY_EVENT_BLOCK::@2387::@2389 DeviceClass
Definition: plugplay.c:16
LIST_ENTRY ListEntry
Definition: plugplay.c:17
PLUGPLAY_EVENT_BLOCK Event
Definition: plugplay.c:18
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
Definition: wdfdevice.h:3739
_In_ CONST GUID * InterfaceClassGuid
Definition: iofuncs.h:1136

Referenced by IoSetDeviceInterfaceState().

◆ IopQueueDeviceInstallEvent()

NTSTATUS IopQueueDeviceInstallEvent ( _In_ const GUID EventGuid,
_In_ PUNICODE_STRING  DeviceId 
)

Definition at line 97 of file plugplay.c.

100{
101 PPNP_EVENT_ENTRY EventEntry;
103 ULONG TotalSize;
104
105 /* Allocate a big enough buffer */
106 Copy.Length = 0;
107 Copy.MaximumLength = DeviceId->Length + sizeof(UNICODE_NULL);
108 TotalSize =
110 Copy.MaximumLength;
111
112 EventEntry = ExAllocatePool(NonPagedPool,
113 TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
114 if (!EventEntry)
116 RtlZeroMemory(EventEntry, TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
117
118 /* Fill the buffer with the event GUID */
119 RtlCopyMemory(&EventEntry->Event.EventGuid, EventGuid, sizeof(GUID));
121 EventEntry->Event.TotalSize = TotalSize;
122
123 /* Fill the symbolic link name */
124 RtlCopyMemory(&EventEntry->Event.InstallDevice.DeviceId,
125 DeviceId->Buffer, DeviceId->Length);
126 EventEntry->Event.InstallDevice.DeviceId[DeviceId->Length / sizeof(WCHAR)] = UNICODE_NULL;
127
129
131
132 return STATUS_SUCCESS;
133}
static BOOL InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard)
Definition: install.c:55
@ DeviceInstallEvent
Definition: cmtypes.h:260
struct _PLUGPLAY_EVENT_BLOCK::@2387::@2391 InstallDevice

Referenced by PiControlInitializeDevice(), and PiInitializeDevNode().

◆ IopQueueTargetDeviceEvent()

NTSTATUS IopQueueTargetDeviceEvent ( const GUID Guid,
PUNICODE_STRING  DeviceIds 
)

Definition at line 137 of file plugplay.c.

139{
140 PPNP_EVENT_ENTRY EventEntry;
142 ULONG TotalSize;
144
145 ASSERT(DeviceIds);
146
147 /* Allocate a big enough buffer */
148 Copy.Length = 0;
149 Copy.MaximumLength = DeviceIds->Length + sizeof(UNICODE_NULL);
150 TotalSize =
152 Copy.MaximumLength;
153
154 EventEntry = ExAllocatePool(NonPagedPool,
155 TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
156 if (!EventEntry)
158 RtlZeroMemory(EventEntry, TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event));
159
160 /* Fill the buffer with the event GUID */
161 RtlCopyMemory(&EventEntry->Event.EventGuid,
162 Guid,
163 sizeof(GUID));
165 EventEntry->Event.TotalSize = TotalSize;
166
167 /* Fill the device id */
168 Copy.Buffer = EventEntry->Event.TargetDevice.DeviceIds;
170 if (!NT_SUCCESS(Status))
171 {
172 ExFreePool(EventEntry);
173 return Status;
174 }
175
177 &EventEntry->ListEntry);
179 0,
180 FALSE);
181
182 return STATUS_SUCCESS;
183}
#define ASSERT(a)
Definition: mode.c:44
@ TargetDeviceChangeEvent
Definition: cmtypes.h:257
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
struct _PLUGPLAY_EVENT_BLOCK::@2387::@2390 TargetDevice
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:691

◆ IopRemovePlugPlayEvent()

static NTSTATUS IopRemovePlugPlayEvent ( _In_ PPLUGPLAY_CONTROL_USER_RESPONSE_DATA  ResponseData)
static

Definition at line 391 of file plugplay.c.

393{
394 /* Remove a pnp event entry from the tail of the queue */
396 {
398 }
399
400 /* Signal the next pnp event in the queue */
402 {
404 0,
405 FALSE);
406 }
407
408 return STATUS_SUCCESS;
409}
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveTailList(ListHead)
Definition: env_spec_w32.h:975
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by NtPlugPlayControl().

◆ IopSetDeviceInstanceData()

NTSTATUS IopSetDeviceInstanceData ( HANDLE  InstanceKey,
PDEVICE_NODE  DeviceNode 
)

Definition at line 606 of file pnpmgr.c.

608{
611 HANDLE LogConfKey, ControlKey, DeviceParamsKey;
612 ULONG ResCount;
615
616 DPRINT("IopSetDeviceInstanceData() called\n");
617
618 /* Create the 'LogConf' key */
619 RtlInitUnicodeString(&KeyName, L"LogConf");
621 &KeyName,
623 InstanceKey,
624 NULL);
625 Status = ZwCreateKey(&LogConfKey,
628 0,
629 NULL,
630 // FIXME? In r53694 it was silently turned from non-volatile into this,
631 // without any extra warning. Is this still needed??
633 NULL);
634 if (NT_SUCCESS(Status))
635 {
636 /* Set 'BootConfig' value */
637 if (DeviceNode->BootResources != NULL)
638 {
639 ResCount = DeviceNode->BootResources->Count;
640 if (ResCount != 0)
641 {
642 RtlInitUnicodeString(&KeyName, L"BootConfig");
643 Status = ZwSetValueKey(LogConfKey,
644 &KeyName,
645 0,
647 DeviceNode->BootResources,
649 }
650 }
651
652 /* Set 'BasicConfigVector' value */
653 if (DeviceNode->ResourceRequirements != NULL &&
654 DeviceNode->ResourceRequirements->ListSize != 0)
655 {
656 RtlInitUnicodeString(&KeyName, L"BasicConfigVector");
657 Status = ZwSetValueKey(LogConfKey,
658 &KeyName,
659 0,
661 DeviceNode->ResourceRequirements,
662 DeviceNode->ResourceRequirements->ListSize);
663 }
664
665 ZwClose(LogConfKey);
666 }
667
668 /* Set the 'ConfigFlags' value */
669 RtlInitUnicodeString(&KeyName, L"ConfigFlags");
670 Status = ZwQueryValueKey(InstanceKey,
671 &KeyName,
673 NULL,
674 0,
675 &ResultLength);
677 {
678 /* Write the default value */
679 ULONG DefaultConfigFlags = 0;
680 Status = ZwSetValueKey(InstanceKey,
681 &KeyName,
682 0,
683 REG_DWORD,
684 &DefaultConfigFlags,
685 sizeof(DefaultConfigFlags));
686 }
687
688 /* Create the 'Control' key */
689 RtlInitUnicodeString(&KeyName, L"Control");
691 &KeyName,
693 InstanceKey,
694 NULL);
695 Status = ZwCreateKey(&ControlKey,
696 0,
698 0,
699 NULL,
701 NULL);
702 if (NT_SUCCESS(Status))
703 ZwClose(ControlKey);
704
705 /* Create the 'Device Parameters' key and set the 'FirmwareIdentified' value for all ACPI-enumerated devices */
706 if (_wcsnicmp(DeviceNode->InstancePath.Buffer, L"ACPI\\", 5) == 0)
707 {
708 RtlInitUnicodeString(&KeyName, L"Device Parameters");
710 &KeyName,
712 InstanceKey,
713 NULL);
714 Status = ZwCreateKey(&DeviceParamsKey,
715 0,
717 0,
718 NULL,
720 NULL);
721 if (NT_SUCCESS(Status))
722 {
723 ULONG FirmwareIdentified = 1;
724 RtlInitUnicodeString(&KeyName, L"FirmwareIdentified");
725 Status = ZwSetValueKey(DeviceParamsKey,
726 &KeyName,
727 0,
728 REG_DWORD,
729 &FirmwareIdentified,
730 sizeof(FirmwareIdentified));
731
732 ZwClose(DeviceParamsKey);
733 }
734 }
735
736 DPRINT("IopSetDeviceInstanceData() done\n");
737
738 return Status;
739}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
@ KeyValueBasicInformation
Definition: nt_native.h:1180
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define REG_RESOURCE_LIST
Definition: nt_native.h:1502
#define REG_RESOURCE_REQUIREMENTS_LIST
Definition: nt_native.h:1504
#define REG_OPTION_VOLATILE
Definition: nt_native.h:1060
ULONG NTAPI PnpDetermineResourceListSize(IN PCM_RESOURCE_LIST ResourceList)
Definition: pnpmgr.c:1237
#define REG_DWORD
Definition: sdbapi.c:596
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699

Referenced by PiControlInitializeDevice().

◆ NtGetPlugPlayEvent()

NTSTATUS NTAPI NtGetPlugPlayEvent ( IN ULONG  Reserved1,
IN ULONG  Reserved2,
OUT PPLUGPLAY_EVENT_BLOCK  Buffer,
IN ULONG  BufferSize 
)

Definition at line 1364 of file plugplay.c.

1368{
1371
1372 DPRINT("NtGetPlugPlayEvent() called\n");
1373
1374 /* Function can only be called from user-mode */
1376 {
1377 DPRINT1("NtGetPlugPlayEvent cannot be called from kernel mode!\n");
1378 return STATUS_ACCESS_DENIED;
1379 }
1380
1381 /* Check for Tcb privilege */
1383 UserMode))
1384 {
1385 DPRINT1("NtGetPlugPlayEvent: Caller does not hold the SeTcbPrivilege privilege!\n");
1387 }
1388
1389 /* Wait for a PnP event */
1390 DPRINT("Waiting for pnp notification event\n");
1393 UserMode,
1394 FALSE,
1395 NULL);
1397 {
1398 DPRINT("KeWaitForSingleObject() failed (Status %lx)\n", Status);
1400 return Status;
1401 }
1402
1403 /* Get entry from the tail of the queue */
1406 ListEntry);
1407
1408 /* Check the buffer size */
1409 if (BufferSize < Entry->Event.TotalSize)
1410 {
1411 DPRINT1("Buffer is too small for the pnp-event\n");
1413 }
1414
1415 /* Copy event data to the user buffer */
1416 _SEH2_TRY
1417 {
1419 Entry->Event.TotalSize,
1420 sizeof(UCHAR));
1422 &Entry->Event,
1423 Entry->Event.TotalSize);
1424 }
1426 {
1428 }
1429 _SEH2_END;
1430
1431 DPRINT("NtGetPlugPlayEvent() done\n");
1432
1433 return STATUS_SUCCESS;
1434}
#define STATUS_PRIVILEGE_NOT_HELD
Definition: DriverTester.h:9
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KernelMode
Definition: asm.h:34
#define UserMode
Definition: asm.h:35
#define KeGetPreviousMode()
Definition: ketypes.h:1115
const LUID SeTcbPrivilege
Definition: priv.c:26
BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a single privilege is present in the context of the calling thread.
Definition: priv.c:744
#define STATUS_USER_APC
Definition: ntstatus.h:78
base of all file and directory entries
Definition: entries.h:83
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
@ UserRequest
Definition: ketypes.h:421

Referenced by PnpEventThread().

◆ NtPlugPlayControl()

NTSTATUS NTAPI NtPlugPlayControl ( IN PLUGPLAY_CONTROL_CLASS  PlugPlayControlClass,
IN OUT PVOID  Buffer,
IN ULONG  BufferLength 
)

Definition at line 1494 of file plugplay.c.

1497{
1498 DPRINT("NtPlugPlayControl(%d %p %lu) called\n",
1499 PlugPlayControlClass, Buffer, BufferLength);
1500
1501 /* Function can only be called from user-mode */
1503 {
1504 DPRINT1("NtGetPlugPlayEvent cannot be called from kernel mode!\n");
1505 return STATUS_ACCESS_DENIED;
1506 }
1507
1508 /* Check for Tcb privilege */
1510 UserMode))
1511 {
1512 DPRINT1("NtGetPlugPlayEvent: Caller does not hold the SeTcbPrivilege privilege!\n");
1514 }
1515
1516 /* Probe the buffer */
1517 _SEH2_TRY
1518 {
1521 sizeof(ULONG));
1522 }
1524 {
1526 }
1527 _SEH2_END;
1528
1529 switch (PlugPlayControlClass)
1530 {
1534 // the Flags field is not used anyway
1536 PlugPlayControlClass);
1537
1538// case PlugPlayControlRegisterNewDevice:
1539// case PlugPlayControlDeregisterDevice:
1540
1545
1551 PlugPlayControlClass);
1552
1553// case PlugPlayControlUnlockDevice:
1558
1563
1564// case PlugPlayControlGenerateLegacyDevice:
1565
1570
1575
1576// case PlugPlayControlDeviceClassAssociation:
1577
1582
1583// case PlugPlayControlGetInterfaceDeviceAlias:
1584
1589
1594
1599
1600// case PlugPlayControlTargetDeviceRelation:
1601// case PlugPlayControlQueryConflictList:
1602// case PlugPlayControlRetrieveDock:
1603// case PlugPlayControlHaltDevice:
1604// case PlugPlayControlGetBlockedDriverList:
1605
1606 default:
1608 }
1609
1611}
@ PlugPlayControlEnumerateDevice
Definition: cmtypes.h:209
@ PlugPlayControlUserResponse
Definition: cmtypes.h:216
@ PlugPlayControlProperty
Definition: cmtypes.h:219
@ PlugPlayControlQueryDeviceRelations
Definition: cmtypes.h:225
@ PlugPlayControlGetRelatedDevice
Definition: cmtypes.h:221
@ PlugPlayControlDeviceStatus
Definition: cmtypes.h:223
@ PlugPlayControlQueryAndRemoveDevice
Definition: cmtypes.h:215
@ PlugPlayControlGetDeviceDepth
Definition: cmtypes.h:224
@ PlugPlayControlInitializeDevice
Definition: cmtypes.h:212
@ PlugPlayControlGetInterfaceDeviceList
Definition: cmtypes.h:218
@ PlugPlayControlStartDevice
Definition: cmtypes.h:213
@ PlugPlayControlResetDevice
Definition: cmtypes.h:229
static NTSTATUS IopGetRelatedDevice(PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA RelatedDeviceData)
Definition: plugplay.c:729
static NTSTATUS PiControlQueryRemoveDevice(_In_ PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA ControlData)
Definition: plugplay.c:1270
static NTSTATUS IopRemovePlugPlayEvent(_In_ PPLUGPLAY_CONTROL_USER_RESPONSE_DATA ResponseData)
Definition: plugplay.c:391
static NTSTATUS IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
Definition: plugplay.c:922
static NTSTATUS IopGetInterfaceDeviceList(PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA DeviceList)
Definition: plugplay.c:413
static NTSTATUS IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
Definition: plugplay.c:1169
static NTSTATUS PiControlSyncDeviceAction(_In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceData, _In_ PLUGPLAY_CONTROL_CLASS ControlClass)
Definition: plugplay.c:1215
static NTSTATUS IopGetDeviceRelations(PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData)
Definition: plugplay.c:1012
static NTSTATUS IopGetDeviceProperty(PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData)
Definition: plugplay.c:491
static NTSTATUS PiControlInitializeDevice(_In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData)
Definition: plugplay.c:289
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771

Referenced by AreDriversLoaded(), ClearDeviceStatus(), DisableDeviceInstance(), EnableDeviceInstance(), GetDeviceStatus(), GetRelationsInstanceList(), GetRelationsInstanceListSize(), InstallDriver(), PNP_CreateDevInst(), PNP_GetDepth(), PNP_GetDeviceRegProp(), PNP_GetInterfaceDeviceList(), PNP_GetInterfaceDeviceListSize(), PNP_GetRelatedDeviceInstance(), PNP_QueryRemove(), PNP_RequestDeviceEject(), PNP_RequestEjectPC(), PnpEventThread(), ReenumerateDeviceInstance(), SetDeviceStatus(), and SetupDeviceInstance().

◆ PiControlInitializeDevice()

static NTSTATUS PiControlInitializeDevice ( _In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA  ControlData)
static

Definition at line 289 of file plugplay.c.

291{
296 HANDLE InstanceKey;
297
298 DPRINT("PiControlInitializeDevice(%p)\n", ControlData);
299
300 Status = IopCaptureUnicodeString(&DeviceInstance, &ControlData->DeviceInstance);
301 if (!NT_SUCCESS(Status))
302 {
303 return Status;
304 }
305
306 DPRINT("Device: %wZ\n", &DeviceInstance);
307
308 /* Leave, if the device already exists */
310 if (DeviceObject != NULL)
311 {
312 DPRINT1("Device %wZ already exists!\n", &DeviceInstance);
315 goto done;
316 }
317
318 DPRINT("Device %wZ does not exist!\n", &DeviceInstance);
319
320 /* Create a device node for the device instance */
322 if (!NT_SUCCESS(Status))
323 {
324 DPRINT1("IoCreateDevice() failed (Status 0x%08lx)\n", Status);
325 goto done;
326 }
327
328 /* Allocate a new device node */
330 if (DeviceNode == NULL)
331 {
332 DPRINT1("Failed to allocate a device node!\n");
335 goto done;
336 }
337
338 // Set the device instance of the device node
339 // NOTE: a NULL-terminated string is required for PnpRootRegisterDevice
343 &DeviceNode->InstancePath);
344 if (!NT_SUCCESS(Status))
345 {
346 DPRINT1("RtlDuplicateUnicodeString() failed (Status 0x%08lx)\n", Status);
349 goto done;
350 }
351
355
357 if (!NT_SUCCESS(Status))
358 {
359 DPRINT1("Failed to create the instance key! (Status %lx)\n", Status);
362 goto done;
363 }
364
365 /* Write the resource information to the registry */
367
368 // Finish the root device registration
370
371 /* Insert as a root enumerated device node */
373
374 /* Report the device to the user-mode pnp manager */
375 IopQueueDeviceInstallEvent(&GUID_DEVICE_ENUMERATED, &DeviceNode->InstancePath);
376
377 ZwClose(InstanceKey);
378done:
380
381 return Status;
382}
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
Definition: green.h:15
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
#define DNF_ENUMERATED
Definition: iotypes.h:174
@ DeviceNodeInitialized
Definition: iotypes.h:536
#define DNF_IDS_QUERIED
Definition: iotypes.h:175
#define DNF_MADEUP
Definition: iotypes.h:170
VOID PiInsertDevNode(_In_ PDEVICE_NODE DeviceNode, _In_ PDEVICE_NODE ParentNode)
Definition: devnode.c:80
PDEVICE_NODE PipAllocateDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject)
NTSTATUS NTAPI IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath, IN ULONG CreateOptions, OUT PHANDLE Handle)
Definition: pnpmgr.c:522
NTSTATUS PnpRootRegisterDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: pnproot.c:107
NTSTATUS IopFreeDeviceNode(IN PDEVICE_NODE DeviceNode)
PNP_DEVNODE_STATE PiSetDevNodeState(_In_ PDEVICE_NODE DeviceNode, _In_ PNP_DEVNODE_STATE NewState)
Definition: devnode.c:108
NTSTATUS PnpRootCreateDeviceObject(OUT PDEVICE_OBJECT *DeviceObject)
Definition: pnproot.c:167
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
NTSTATUS IopSetDeviceInstanceData(HANDLE InstanceKey, PDEVICE_NODE DeviceNode)
Definition: pnpmgr.c:606
NTSTATUS IopQueueDeviceInstallEvent(_In_ const GUID *EventGuid, _In_ PUNICODE_STRING DeviceId)
Definition: plugplay.c:97
#define DO_BUS_ENUMERATED_DEVICE

Referenced by NtPlugPlayControl().

◆ PiControlQueryRemoveDevice()

static NTSTATUS PiControlQueryRemoveDevice ( _In_ PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA  ControlData)
static

Definition at line 1270 of file plugplay.c.

1272{
1276
1277 Status = IopCaptureUnicodeString(&DeviceInstance, &ControlData->DeviceInstance);
1278 if (!NT_SUCCESS(Status))
1279 {
1280 return Status;
1281 }
1282
1284 if (DeviceInstance.Buffer != NULL)
1285 {
1286 ExFreePool(DeviceInstance.Buffer);
1287 }
1288 if (DeviceObject == NULL)
1289 {
1290 return STATUS_NO_SUCH_DEVICE;
1291 }
1292
1295
1297
1298 return Status;
1299}

Referenced by NtPlugPlayControl().

◆ PiControlSyncDeviceAction()

static NTSTATUS PiControlSyncDeviceAction ( _In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA  DeviceData,
_In_ PLUGPLAY_CONTROL_CLASS  ControlClass 
)
static

Definition at line 1215 of file plugplay.c.

1218{
1222
1226
1228 if (!NT_SUCCESS(Status))
1229 {
1230 return Status;
1231 }
1232
1234 if (DeviceInstance.Buffer != NULL)
1235 {
1236 ExFreePool(DeviceInstance.Buffer);
1237 }
1238 if (DeviceObject == NULL)
1239 {
1240 return STATUS_NO_SUCH_DEVICE;
1241 }
1242
1244
1245 switch (ControlClass)
1246 {
1249 break;
1252 break;
1255 break;
1256 default:
1258 break;
1259 }
1260
1262
1264
1265 return Status;
1266}
static const WCHAR ControlClass[]
Definition: cfgmgr.c:44
#define UNREACHABLE
@ PiActionResetDevice
Definition: io.h:528
@ PiActionStartDevice
Definition: io.h:530
@ PiActionEnumDeviceTree
Definition: io.h:526
enum _DEVICE_ACTION DEVICE_ACTION
NTSTATUS PiPerformSyncDeviceAction(_In_ PDEVICE_OBJECT DeviceObject, _In_ DEVICE_ACTION Action)
Perfom a device operation synchronously via PiQueueDeviceAction.
Definition: devaction.c:2718
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510

Referenced by NtPlugPlayControl().

◆ PiIsDevNodeStarted()

static BOOLEAN PiIsDevNodeStarted ( _In_ PDEVICE_NODE  DeviceNode)
static

Definition at line 862 of file plugplay.c.

864{
865 return (DeviceNode->State == DeviceNodeStartPending ||
868 DeviceNode->State == DeviceNodeStarted ||
872 DeviceNode->State == DeviceNodeStopped ||
874}
@ DeviceNodeStopped
Definition: iotypes.h:544
@ DeviceNodeRestartCompletion
Definition: iotypes.h:545
@ DeviceNodeStartPostWork
Definition: iotypes.h:541
@ DeviceNodeStarted
Definition: iotypes.h:542
@ DeviceNodeStartCompletion
Definition: iotypes.h:540
@ DeviceNodeEnumerateCompletion
Definition: iotypes.h:547
@ DeviceNodeEnumeratePending
Definition: iotypes.h:546
@ DeviceNodeQueryStopped
Definition: iotypes.h:543
@ DeviceNodeStartPending
Definition: iotypes.h:539

Referenced by IopGetDeviceNodeStatus().

Variable Documentation

◆ IopPnpEventQueueHead

◆ IopPnpNotifyEvent