ReactOS  0.4.15-dev-1206-g731eddf
parport.c File Reference
#include "parport.h"
Include dependency graph for parport.c:

Go to the source code of this file.

Functions

static VOID NTAPI DriverUnload (IN PDRIVER_OBJECT DriverObject)
 
static NTSTATUS NTAPI DispatchCreate (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchClose (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchCleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchRead (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchWrite (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchPnp (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
static NTSTATUS NTAPI DispatchPower (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
 

Variables

static DRIVER_UNLOAD DriverUnload
 
static DRIVER_DISPATCH DispatchCreate
 
static DRIVER_DISPATCH DispatchClose
 
static DRIVER_DISPATCH DispatchCleanup
 
static DRIVER_DISPATCH DispatchPnp
 
static DRIVER_DISPATCH DispatchPower
 
DRIVER_INITIALIZE DriverEntry
 

Function Documentation

◆ DispatchCleanup()

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

Definition at line 58 of file parport.c.

60 {
61  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
62  return FdoCleanup(DeviceObject, Irp);
63  else
64  return PdoCleanup(DeviceObject, Irp);
65 }
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI PdoCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:67
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI FdoCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:462

◆ DispatchClose()

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

Definition at line 45 of file parport.c.

47 {
48  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
49  return FdoClose(DeviceObject, Irp);
50  else
51  return PdoClose(DeviceObject, Irp);
52 }
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI PdoClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:47
NTSTATUS NTAPI FdoClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:442
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464

◆ DispatchCreate()

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

Definition at line 32 of file parport.c.

34 {
35  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
36  return FdoCreate(DeviceObject, Irp);
37  else
38  return PdoCreate(DeviceObject, Irp);
39 }
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI PdoCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:14
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI FdoCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:409

◆ DispatchPnp()

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

Definition at line 97 of file parport.c.

99 {
100  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
101  return FdoPnp(DeviceObject, Irp);
102  else
103  return PdoPnp(DeviceObject, Irp);
104 }
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI FdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:505
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI PdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:161

◆ DispatchPower()

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

Definition at line 110 of file parport.c.

112 {
113  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
114  return FdoPower(DeviceObject, Irp);
115  else
116  return PdoPower(DeviceObject, Irp);
117 }
_In_ PIRP Irp
Definition: csq.h:116
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI PdoPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:175
NTSTATUS NTAPI FdoPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:600

◆ DispatchRead()

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

Definition at line 71 of file parport.c.

73 {
74  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
75  return FdoRead(DeviceObject, Irp);
76  else
77  return PdoRead(DeviceObject, Irp);
78 }
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI PdoRead(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:81
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI FdoRead(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:477

Referenced by DriverEntry().

◆ DispatchWrite()

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

Definition at line 84 of file parport.c.

86 {
87  if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
88  return FdoWrite(DeviceObject, Irp);
89  else
90  return PdoWrite(DeviceObject, Irp);
91 }
NTSTATUS NTAPI PdoWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:95
_In_ PIRP Irp
Definition: csq.h:116
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
NTSTATUS NTAPI FdoWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:491

Referenced by DriverEntry().

◆ DriverEntry()

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

Definition at line 122 of file parport.c.

124 {
125  ULONG i;
126 
127  DPRINT("Parport DriverEntry\n");
128 
131 
132  for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
134 
140 // DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl;
141 // DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = DispatchQueryInformation;
144 
145  return STATUS_SUCCESS;
146 }
static DRIVER_DISPATCH DispatchCleanup
Definition: parport.c:12
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
static DRIVER_UNLOAD DriverUnload
Definition: parport.c:9
static DRIVER_DISPATCH DispatchPnp
Definition: parport.c:13
DRIVER_ADD_DEVICE AddDevice
Definition: parport.h:72
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
DRIVER_DISPATCH ForwardIrpAndForget
Definition: i8042prt.h:341
#define IRP_MJ_MAXIMUM_FUNCTION
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
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2262
static NTSTATUS NTAPI DispatchRead(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: parport.c:71
static DRIVER_DISPATCH DispatchPower
Definition: parport.c:14
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
void DPRINT(...)
Definition: polytest.cpp:61
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2268
static DRIVER_DISPATCH DispatchClose
Definition: parport.c:11
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2200
static NTSTATUS NTAPI DispatchWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: parport.c:84
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CLEANUP
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2269
unsigned int ULONG
Definition: retypes.h:1
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
static DRIVER_DISPATCH DispatchCreate
Definition: parport.c:10
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ DriverUnload()

static VOID NTAPI DriverUnload ( IN PDRIVER_OBJECT  DriverObject)
static

Definition at line 23 of file parport.c.

24 {
25  DPRINT("Parport DriverUnload\n");
26 }
void DPRINT(...)
Definition: polytest.cpp:61

Variable Documentation

◆ DispatchCleanup

DRIVER_DISPATCH DispatchCleanup
static

Definition at line 12 of file parport.c.

Referenced by DriverEntry().

◆ DispatchClose

DRIVER_DISPATCH DispatchClose
static

Definition at line 11 of file parport.c.

Referenced by DriverEntry().

◆ DispatchCreate

DRIVER_DISPATCH DispatchCreate
static

Definition at line 10 of file parport.c.

Referenced by DriverEntry().

◆ DispatchPnp

DRIVER_DISPATCH DispatchPnp
static

Definition at line 13 of file parport.c.

Referenced by DriverEntry().

◆ DispatchPower

DRIVER_DISPATCH DispatchPower
static

Definition at line 14 of file parport.c.

Referenced by DriverEntry().

◆ DriverEntry

DRIVER_INITIALIZE DriverEntry

Definition at line 15 of file parport.c.

◆ DriverUnload

DRIVER_UNLOAD DriverUnload
static

Definition at line 9 of file parport.c.

Referenced by DriverEntry().