ReactOS  0.4.14-dev-49-gfb4591c
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 */
#define IN
Definition: typedefs.h:38
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define IRP_MJ_CREATE_MAILSLOT
#define IRP_MJ_QUERY_SECURITY
#define IRP_MJ_FLUSH_BUFFERS
#define IRP_MJ_SHUTDOWN
_In_ PIRP Irp
Definition: csq.h:116
#define IRP_MJ_SET_SECURITY
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
LONG NTSTATUS
Definition: precomp.h:26
#define IRP_MJ_SET_VOLUME_INFORMATION
uint32_t ULONG_PTR
Definition: typedefs.h:63
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define IRP_MJ_SET_EA
#define IoCompleteRequest
Definition: irp.c:1240
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
Definition: _stack.h:47
#define IRP_MJ_SET_QUOTA
#define IRP_MJ_QUERY_EA
#define IRP_MJ_DEVICE_CHANGE
#define IRP_MJ_QUERY_QUOTA
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define HANDLE_CTRL_CODE(Code)
#define IRP_MJ_SYSTEM_CONTROL
NTSTATUS NTAPI ConDrvDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:31
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
#define DPRINT1
Definition: precomp.h:8
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CLEANUP
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
return STATUS_SUCCESS
Definition: btrfs.c:2966
Iosb Information
Definition: create.c:4377
#define IRP_MJ_CREATE_NAMED_PIPE
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52