ReactOS 0.4.15-dev-8096-ga0eec98
serenum.c
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.c
5 * PURPOSE: Serial enumerator driver entry point
6 *
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
8 */
9
10#include "serenum.h"
11
12#include <debug.h>
13
16static DRIVER_UNLOAD DriverUnload;
17DRIVER_INITIALIZE DriverEntry;
18
19static NTSTATUS NTAPI
22 IN PIRP Irp)
23{
24 if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
26 else
28}
29
30static VOID NTAPI
32{
33 // nothing to do here yet
34}
35
36static NTSTATUS NTAPI
39 IN PIRP Irp)
40{
41 if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
42 {
43 /* Forward IRPs to lower device */
45 }
46 else
47 {
48 /* Forward IRPs to attached FDO */
50 }
51}
52
53/*
54 * Standard DriverEntry method.
55 */
59 IN PUNICODE_STRING RegPath)
60{
61 ULONG i;
62
63 DriverObject->DriverUnload = DriverUnload;
64 DriverObject->DriverExtension->AddDevice = SerenumAddDevice;
65
66 for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
67 DriverObject->MajorFunction[i] = IrpStub;
68
69 //DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = SerialQueryInformation;
70 DriverObject->MajorFunction[IRP_MJ_PNP] = SerenumPnp;
71 //DriverObject->MajorFunction[IRP_MJ_POWER] = SerialPower;
72
73 return STATUS_SUCCESS;
74}
LONG NTSTATUS
Definition: precomp.h:26
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI ForwardIrpToAttachedFdoAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:108
NTSTATUS NTAPI ForwardIrpToLowerDeviceAndForget(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: misc.c:90
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
DRIVER_DISPATCH(nfs41_FsdDispatch)
static DRIVER_DISPATCH SerenumPnp
Definition: serenum.c:14
static DRIVER_DISPATCH IrpStub
Definition: serenum.c:15
DRIVER_INITIALIZE DriverEntry
Definition: serenum.c:17
static DRIVER_UNLOAD DriverUnload
Definition: serenum.c:16
DRIVER_ADD_DEVICE SerenumAddDevice
Definition: serenum.h:77
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
#define STATUS_SUCCESS
Definition: shellext.h:65
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
#define IRP_MJ_MAXIMUM_FUNCTION