ReactOS 0.4.15-dev-5664-g3bf4ef6
dispatch.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Driver
4 * FILE: drivers/base/condrv/dispatch.c
5 * PURPOSE: Console Driver - Dispatching interface
6 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include "condrv.h"
12
13#define NDEBUG
14#include <debug.h>
15
16/* FUNCTIONS ******************************************************************/
17
22{
23 Irp->IoStatus.Status = Status;
24 Irp->IoStatus.Information = Information;
26
27 return Status;
28}
29
32{
33#define HANDLE_CTRL_CODE(Code) \
34 case Code : \
35 { \
36 DPRINT1("ConDrv: " #Code ", stack->FileObject = 0x%p\n", stack->FileObject); \
37 if (stack->FileObject) \
38 { \
39 DPRINT1("stack->FileObject->FileName = %wZ\n", &stack->FileObject->FileName); \
40 } \
41 break; \
42 }
43
45 // ULONG ctrlCode = stack->Parameters.DeviceIoControl.IoControlCode;
46 ULONG MajorFunction = stack->MajorFunction;
47
48 /* Just display all the IRP codes for now... */
49 switch (MajorFunction)
50 {
79 // case IRP_MJ_PNP_POWER:
80 // case IRP_MJ_MAXIMUM_FUNCTION:
81
82 default:
83 {
84 DPRINT1("Unknown Major %lu\n", MajorFunction);
85 break;
86 }
87 }
88
90}
91
92/* EOF */
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
Definition: _stack.h:55
_In_ PIRP Irp
Definition: csq.h:116
DRIVER_DISPATCH ConDrvDispatch
Definition: condrv.c:31
#define HANDLE_CTRL_CODE(Code)
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
Status
Definition: gdiplustypes.h:25
unsigned int ULONG
Definition: retypes.h:1
#define IoCompleteRequest
Definition: irp.c:1240
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
#define STATUS_SUCCESS
Definition: shellext.h:65
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
#define IRP_MJ_DEVICE_CHANGE
#define IRP_MJ_QUERY_EA
#define IRP_MJ_CREATE_NAMED_PIPE
#define IRP_MJ_CREATE_MAILSLOT
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_SET_VOLUME_INFORMATION
#define IRP_MJ_SET_QUOTA
#define IRP_MJ_QUERY_QUOTA
#define IRP_MJ_QUERY_SECURITY
#define IRP_MJ_SET_EA
#define IRP_MJ_SYSTEM_CONTROL
#define IRP_MJ_FLUSH_BUFFERS
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MJ_SHUTDOWN
#define IRP_MJ_POWER
#define IRP_MJ_SET_SECURITY
#define IRP_MJ_CLEANUP