ReactOS 0.4.16-dev-257-g6aa11ac
serenum.c File Reference
#include "serenum.h"
#include <debug.h>
Include dependency graph for serenum.c:

Go to the source code of this file.

Functions

static NTSTATUS NTAPI SerenumPnp (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static VOID NTAPI DriverUnload (IN PDRIVER_OBJECT DriverObject)
 
static NTSTATUS NTAPI IrpStub (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
 

Variables

static DRIVER_DISPATCH SerenumPnp
 
static DRIVER_DISPATCH IrpStub
 
static DRIVER_UNLOAD DriverUnload
 
DRIVER_INITIALIZE DriverEntry
 

Function Documentation

◆ DriverEntry()

NTSTATUS NTAPI DriverEntry ( IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegPath 
)

Definition at line 57 of file serenum.c.

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}
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
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
static DRIVER_DISPATCH SerenumPnp
Definition: serenum.c:14
static DRIVER_DISPATCH IrpStub
Definition: serenum.c:15
static DRIVER_UNLOAD DriverUnload
Definition: serenum.c:16
DRIVER_ADD_DEVICE SerenumAddDevice
Definition: serenum.h:77
#define STATUS_SUCCESS
Definition: shellext.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
#define IRP_MJ_MAXIMUM_FUNCTION

◆ DriverUnload()

static VOID NTAPI DriverUnload ( IN PDRIVER_OBJECT  DriverObject)
static

Definition at line 31 of file serenum.c.

32{
33 // nothing to do here yet
34}

◆ IrpStub()

static NTSTATUS NTAPI IrpStub ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
static

Definition at line 37 of file serenum.c.

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}
_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
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055

◆ SerenumPnp()

static NTSTATUS NTAPI SerenumPnp ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
static

Definition at line 20 of file serenum.c.

23{
24 if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
26 else
28}
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

Variable Documentation

◆ DriverEntry

DRIVER_INITIALIZE DriverEntry

Definition at line 17 of file serenum.c.

◆ DriverUnload

DRIVER_UNLOAD DriverUnload
static

Definition at line 16 of file serenum.c.

Referenced by DriverEntry().

◆ IrpStub

DRIVER_DISPATCH IrpStub
static

Definition at line 15 of file serenum.c.

Referenced by DriverEntry().

◆ SerenumPnp

DRIVER_DISPATCH SerenumPnp
static

Definition at line 14 of file serenum.c.

Referenced by DriverEntry().