18{
26
28
38 {
39 DPRINT(
"IoCreateDevice() failed with status %08lx\n",
Status);
41 }
42
48
49
60 {
61 DPRINT(
"ObOpenObjectByName() failed with status %08lx\n",
Status);
63 }
72 {
73 DPRINT(
"ObReferenceObjectByHandle() failed with status %08lx\n",
Status);
75 }
76 Fcr = 0;
80 {
81 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
83 }
87 {
88 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
90 }
97 {
98 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
100 }
106 {
107 DPRINT(
"GreenDeviceIoControl() failed with status %08lx\n",
Status);
109 }
110
113
115
120 {
121 if (DeviceExtension && DeviceExtension->
Serial)
124 {
126 {
129 }
131 {
134 }
135 }
136 }
138}
#define FILE_DEVICE_SECURE_OPEN
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static void cleanup(void)
struct _GREEN_DEVICE_EXTENSION * PGREEN_DEVICE_EXTENSION
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)
HLOCAL NTAPI LocalHandle(LPCVOID pMem)
#define OBJ_KERNEL_HANDLE
POBJECT_TYPE IoFileObjectType
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
#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)
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
#define FILE_DEVICE_TERMSRV
SERIAL_LINE_CONTROL LineControl
COMMON_FDO_DEVICE_EXTENSION Common
ULONG ReadIntervalTimeout
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
#define ObDereferenceObject