ReactOS  0.4.12-dev-914-g71f84a3
condrv.c File Reference
#include "condrv.h"
#include <debug.h>
Include dependency graph for condrv.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 
VOID NTAPI ConDrvUnload (IN PDRIVER_OBJECT DriverObject)
 

Variables

DRIVER_INITIALIZE DriverEntry
 
DRIVER_UNLOAD ConDrvUnload
 
DRIVER_DISPATCH ConDrvDispatch
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file condrv.c.

Function Documentation

◆ ConDrvUnload()

VOID NTAPI ConDrvUnload ( IN PDRIVER_OBJECT  DriverObject)

Definition at line 80 of file condrv.c.

81 {
82  DPRINT1("Unloading ReactOS Console Driver v0.0.1...\n");
83 
84  /*
85  * Delete the Controller device. This has as effect
86  * to delete also all the terminals.
87  */
89 
90  /* Sanity check: No devices must exist at this point */
92 
93  DPRINT1("Done\n");
94  return;
95 }
NTSTATUS NTAPI ConDrvDeleteController(IN PDRIVER_OBJECT DriverObject)
Definition: control.c:66
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define DPRINT1
Definition: precomp.h:8
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2168

◆ DriverEntry()

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

Definition at line 34 of file condrv.c.

36 {
38  USHORT i;
40 
41  DPRINT1("Loading ReactOS Console Driver v0.0.1...\n");
42 
44 
45  /* Initialize the different callback function pointers */
46  for (i = 0 ; i <= IRP_MJ_MAXIMUM_FUNCTION ; ++i)
48 
49 #if 0
50  DriverObject->MajorFunction[IRP_MJ_CREATE] = ConDrvCreate;
52 
53  /* temporary deactivated...
54  DriverObject->MajorFunction[IRP_MJ_CLEANUP] = ConDrvCleanup;
55  */
56  DriverObject->MajorFunction[IRP_MJ_READ] = ConDrvRead;
57  DriverObject->MajorFunction[IRP_MJ_WRITE] = ConDrvWrite;
58 
60 #endif
61 
63  DriverObject, // Unique ID for the driver object extension ==> gives it its address !
64  sizeof(CONDRV_DRIVER),
66  if (!NT_SUCCESS(Status))
67  {
68  DPRINT1("IoAllocateDriverObjectExtension() failed with status 0x%08lx\n", Status);
69  return Status;
70  }
72 
74 
75  DPRINT1("Done, Status = 0x%08lx\n", Status);
76  return Status;
77 }
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1755
#define IRP_MJ_MAXIMUM_FUNCTION
LONG NTSTATUS
Definition: precomp.h:26
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
WORD NTAPI ConDrvClose(PDOS_DEVICE_NODE Device)
Definition: condrv.c:124
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
DRIVER_UNLOAD ConDrvUnload
Definition: condrv.c:22
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2179
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
Status
Definition: gdiplustypes.h:24
DRIVER_DISPATCH ConDrvDispatch
Definition: condrv.c:31
unsigned short USHORT
Definition: pedump.c:61
#define DPRINT1
Definition: precomp.h:8
#define IRP_MJ_READ
Definition: rdpdr.c:46
NTSTATUS NTAPI ConDrvCreateController(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: control.c:21
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2180
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Variable Documentation

◆ ConDrvDispatch

DRIVER_DISPATCH ConDrvDispatch

Definition at line 31 of file condrv.c.

Referenced by DriverEntry().

◆ ConDrvUnload

DRIVER_UNLOAD ConDrvUnload

Definition at line 22 of file condrv.c.

Referenced by DriverEntry().

◆ DriverEntry