ReactOS  0.4.14-dev-614-gbfd8a84
serenum.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Serial enumerator driver
4  * FILE: drivers/bus/serenum/serenum.h
5  * PURPOSE: Serial enumerator driver header
6  *
7  * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
8  */
9 
10 #ifndef _SERENUM_PCH_
11 #define _SERENUM_PCH_
12 
13 #include <ntifs.h>
14 #include <ntddser.h>
15 
16 typedef enum
17 {
24 
25 typedef struct _COMMON_DEVICE_EXTENSION
26 {
27  BOOLEAN IsFDO;
30 
31 typedef struct _FDO_DEVICE_EXTENSION
32 {
34 
38 
40 
44 
45 typedef struct _PDO_DEVICE_EXTENSION
46 {
48 
50 
54  UNICODE_STRING HardwareIds; // REG_MULTI_SZ
55  UNICODE_STRING CompatibleIds; // REG_MULTI_SZ
57 
58 #define SERENUM_TAG 'ereS'
59 
60 /* Flags */
61 #define FLAG_ENUMERATION_DONE 0x01
62 
63 /************************************ detect.c */
64 
68  IN PDEVICE_OBJECT LowerDevice);
69 
73  IN PDEVICE_OBJECT LowerDevice);
74 
75 /************************************ fdo.c */
76 
77 DRIVER_ADD_DEVICE SerenumAddDevice;
78 
82  IN PIRP Irp);
83 
84 /************************************ misc.c */
85 
89  ... /* list of PCSZ */);
90 
94  IN PIRP Irp);
95 
99  IN PIRP Irp);
100 
104  IN PIRP Irp);
105 
109  IN PIRP Irp);
110 
111 NTSTATUS
113  IN ULONG Flags,
116 
117 /************************************ pdo.c */
118 
119 NTSTATUS
122  IN PIRP Irp);
123 
124 /************************************ serenum.c */
125 
129  IN PUNICODE_STRING RegPath);
130 
131 #endif /* _SERENUM_PCH_ */
#define IN
Definition: typedefs.h:38
struct _PDO_DEVICE_EXTENSION PDO_DEVICE_EXTENSION
NTSTATUS ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:32
SERENUM_DEVICE_STATE
Definition: serenum.h:16
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
UNICODE_STRING HardwareIds
Definition: serenum.h:54
NTSTATUS SerenumDetectPnpDevice(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT LowerDevice)
Definition: detect.c:223
NTSTATUS SerenumDetectLegacyDevice(IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT LowerDevice)
Definition: detect.c:444
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
DRIVER_ADD_DEVICE SerenumAddDevice
Definition: serenum.h:77
unsigned char BOOLEAN
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:55
NTSTATUS SerenumInitMultiSzString(OUT PUNICODE_STRING Destination,...)
Definition: misc.c:20
PDEVICE_OBJECT AttachedFdo
Definition: parport.h:59
NTSTATUS DuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: misc.c:72
UNICODE_STRING SerenumInterfaceName
Definition: serenum.h:39
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2891
UNICODE_STRING DeviceId
Definition: serenum.h:52
UNICODE_STRING DeviceDescription
Definition: pci.h:69
NTSTATUS NTAPI ForwardIrpToLowerDeviceAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:134
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:80
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
Definition: beep.c:367
NTSTATUS SerenumFdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:152
NTSTATUS SerenumPdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:109
SERENUM_DEVICE_STATE PnpState
Definition: serenum.h:28
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
#define OUT
Definition: typedefs.h:39
PDEVICE_OBJECT Pdo
Definition: i8042prt.h:128
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
unsigned int ULONG
Definition: retypes.h:1
UNICODE_STRING CompatibleIds
Definition: serenum.h:55
PDEVICE_OBJECT LowerDevice
Definition: i8042prt.h:130
IO_REMOVE_LOCK RemoveLock
Definition: serenum.h:37
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
PDEVICE_OBJECT AttachedPdo[2]
Definition: parport.h:44
UNICODE_STRING InstanceId
Definition: serenum.h:53
NTSTATUS NTAPI ForwardIrpAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:59
struct _FDO_DEVICE_EXTENSION FDO_DEVICE_EXTENSION
NTSTATUS NTAPI ForwardIrpToAttachedFdoAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:152