23 TRACE_(SERENUM,
"SerenumAddDevice called. Pdo = %p\n",
Pdo);
35 WARN_(SERENUM,
"IoCreateDevice() failed with status 0x%08lx\n",
Status);
44 &GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR,
49 WARN_(SERENUM,
"IoRegisterDeviceInterface() failed with status 0x%08lx\n",
Status);
56 DeviceExtension->
Pdo =
Pdo;
61 WARN_(SERENUM,
"IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n",
Status);
71 Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
84 TRACE_(SERENUM,
"SerenumFdoStartDevice() called\n");
92 WARN_(SERENUM,
"IoSetDeviceInterfaceState() failed with status 0x%08lx\n",
Status);
136 if (!DeviceRelations)
140 DeviceRelations->
Count = NumPDO;
141 for (
i = 0;
i < NumPDO;
i++)
147 *pDeviceRelations = DeviceRelations;
183 TRACE_(SERENUM,
"IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
201 switch (
Stack->Parameters.QueryDeviceRelations.Type)
206 TRACE_(SERENUM,
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
212 TRACE_(SERENUM,
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
213 Stack->Parameters.QueryDeviceRelations.Type);
220 TRACE_(SERENUM,
"IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define FILE_DEVICE_SECURE_OPEN
#define NT_SUCCESS(StatCode)
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
NTSTATUS SerenumDetectPnpDevice(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT LowerDevice)
NTSTATUS SerenumDetectLegacyDevice(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT LowerDevice)
#define ExAllocatePoolWithTag(hernya, size, tag)
struct _DEVICE_OBJECT * PDEVICE_OBJECT
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
DRIVER_DISPATCH ForwardIrpAndForget
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
NTSTATUS NTAPI IoAttachDeviceToDeviceStackSafe(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice, IN OUT PDEVICE_OBJECT *AttachedToDeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject, IN CONST GUID *InterfaceClassGuid, IN PUNICODE_STRING ReferenceString OPTIONAL, OUT PUNICODE_STRING SymbolicLinkName)
NTSTATUS NTAPI IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, IN BOOLEAN Enable)
#define IoCompleteRequest
BOOLEAN NTAPI IoForwardIrpSynchronously(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define FILE_DEVICE_BUS_EXTENDER
DRIVER_ADD_DEVICE SerenumAddDevice
#define FLAG_ENUMERATION_DONE
NTSTATUS SerenumFdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
static NTSTATUS SerenumFdoQueryBusRelations(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS *pDeviceRelations)
static NTSTATUS NTAPI SerenumFdoStartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
PDEVICE_OBJECT Objects[1]
UNICODE_STRING SerenumInterfaceName
PDEVICE_OBJECT LowerDevice
PDEVICE_OBJECT AttachedPdo[2]
COMMON_DEVICE_EXTENSION Common
IO_REMOVE_LOCK RemoveLock
#define RtlZeroMemory(Destination, Length)
#define STATUS_DEVICE_NOT_CONNECTED
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_In_ UCHAR _In_ UCHAR MinorFunction
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFDEVICE Fdo
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_ WDFDRIVER _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT Pdo
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
#define IoInitializeRemoveLock(Lock, AllocateTag, MaxLockedMinutes, HighWatermark)
#define IRP_MN_START_DEVICE
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define ObReferenceObject