39 DPRINT(
"IoCreateDevice() failed with status %08lx\n",
Status);
61 DPRINT(
"ObOpenObjectByName() failed with status %08lx\n",
Status);
73 DPRINT(
"ObReferenceObjectByHandle() failed with status %08lx\n",
Status);
81 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
88 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
98 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
107 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
121 if (DeviceExtension && DeviceExtension->
Serial)
156 DPRINT(
"IoReportDetectedDevice() failed with status 0x%lx\n",
Status);
243 DPRINT(
"IoCreateDevice() failed with status 0x%lx\n",
Status);
263 DPRINT(
"IoCreateDevice() failed with status 0x%lx\n",
Status);
275 if (!DeviceRelations)
279 DeviceRelations->
Count = 2;
285 *pDeviceRelations = DeviceRelations;
294 for (
i = 0;
i < DeviceRelations->
Count;
i++)
337 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceId / Unknown type 0x%lx\n",
372 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs / Unknown type 0x%lx\n",
400 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n",
IdType);
420 switch (
Stack->MinorFunction)
424 DPRINT(
"IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
429 DPRINT1(
"IRP_MJ_PNP / IRP_MN_START_DEVICE / Unknown type 0x%lx\n",
437 DPRINT(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS\n");
438 switch (
Stack->Parameters.QueryDeviceRelations.Type)
452 if (!DeviceRelations)
456 DeviceRelations->
Count = 0;
463 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations / Unknown type 0x%lx\n",
471 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
472 Stack->Parameters.QueryDeviceRelations.Type);
480 DPRINT(
"IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
486 DPRINT(
"IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
492 DPRINT(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT\n");
493 switch (
Stack->Parameters.QueryDeviceText.DeviceTextType)
519 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription / Unknown type 0x%lx\n",
534 DPRINT1(
"IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n",
535 Stack->Parameters.QueryDeviceText.DeviceTextType);
544 DPRINT(
"IRP_MJ_PNP / IRP_MN_QUERY_ID\n");
550 DPRINT1(
"IRP_MJ_PNP / unknown minor function 0x%lx\n",
Stack->MinorFunction);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define FILE_DEVICE_SECURE_OPEN
_In_ BUS_QUERY_ID_TYPE IdType
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static const WCHAR Description[]
static void cleanup(void)
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
struct _DEVICE_OBJECT * PDEVICE_OBJECT
#define ExAllocatePool(type, size)
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
NTSTATUS GreenDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
struct _GREEN_DEVICE_EXTENSION * PGREEN_DEVICE_EXTENSION
NTSTATUS KeyboardAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
NTSTATUS GreenDeviceIoControl(IN PDEVICE_OBJECT DeviceObject, IN ULONG CtlCode, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer OPTIONAL, IN OUT PULONG OutputBufferSize)
NTSTATUS ScreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
HLOCAL NTAPI LocalHandle(LPCVOID pMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
POBJECT_TYPE IoFileObjectType
static NTSTATUS ReportGreenPdo(IN PDRIVER_OBJECT DriverObject, IN PGREEN_DRIVER_EXTENSION DriverExtension)
static NTSTATUS GreenQueryId(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, OUT ULONG_PTR *Information)
NTSTATUS NTAPI GreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
static NTSTATUS GreenQueryBusRelations(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS *pDeviceRelations)
static NTSTATUS CreateGreenFdo(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT GreenPdo)
NTSTATUS GreenPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define FILE_AUTOGENERATED_DEVICE_NAME
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define IOCTL_SERIAL_SET_LINE_CONTROL
#define IOCTL_SERIAL_SET_TIMEOUTS
#define IOCTL_SERIAL_SET_FIFO_CONTROL
#define IOCTL_SERIAL_SET_BAUD_RATE
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
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)
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
#define IoCompleteRequest
NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN OUT PVOID ParseContext, OUT PHANDLE Handle)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
PPCI_DRIVER_EXTENSION DriverExtension
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
NTSTATUS NTAPI IoReportDetectedDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ INTERFACE_TYPE LegacyBusType, _In_ ULONG BusNumber, _In_ ULONG SlotNumber, _In_opt_ PCM_RESOURCE_LIST ResourceList, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements, _In_ BOOLEAN ResourceAssigned, _Inout_ PDEVICE_OBJECT *DeviceObject)
#define FILE_DEVICE_SCREEN
#define FILE_DEVICE_KEYBOARD
#define FILE_DEVICE_TERMSRV
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
PDEVICE_OBJECT Objects[1]
SERIAL_LINE_CONTROL LineControl
COMMON_FDO_DEVICE_EXTENSION Common
PDEVICE_OBJECT KeyboardPdo
struct _IO_STACK_LOCATION::@3983::@4014 QueryId
union _IO_STACK_LOCATION::@1584 Parameters
DEVICE_RELATION_TYPE Type
ULONG ReadIntervalTimeout
#define FIELD_OFFSET(t, f)
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
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 DO_BUS_ENUMERATED_DEVICE
#define IRP_MN_START_DEVICE
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_MN_QUERY_RESOURCES
@ DeviceTextLocationInformation
#define ObDereferenceObject
#define ObReferenceObject