ReactOS 0.4.15-dev-7889-g76290a6
dispatch.c File Reference
#include "condrv.h"
#include <debug.h>
Include dependency graph for dispatch.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define HANDLE_CTRL_CODE(Code)
 

Functions

NTSTATUS NTAPI CompleteRequest (IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
 
NTSTATUS NTAPI ConDrvDispatch (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 

Macro Definition Documentation

◆ HANDLE_CTRL_CODE

#define HANDLE_CTRL_CODE (   Code)
Value:
case Code : \
{ \
DPRINT1("ConDrv: " #Code ", stack->FileObject = 0x%p\n", stack->FileObject); \
if (stack->FileObject) \
{ \
DPRINT1("stack->FileObject->FileName = %wZ\n", &stack->FileObject->FileName); \
} \
break; \
}
Definition: _stack.h:55
#define Code
Definition: deflate.h:80
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
Definition: wdfdevice.h:1701

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file dispatch.c.

Function Documentation

◆ CompleteRequest()

NTSTATUS NTAPI CompleteRequest ( IN PIRP  Irp,
IN NTSTATUS  Status,
IN ULONG_PTR  Information 
)

Definition at line 19 of file dispatch.c.

22{
23 Irp->IoStatus.Status = Status;
24 Irp->IoStatus.Information = Information;
26
27 return Status;
28}
_In_ PIRP Irp
Definition: csq.h:116
Status
Definition: gdiplustypes.h:25
#define IoCompleteRequest
Definition: irp.c:1240
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
#define IO_NO_INCREMENT
Definition: iotypes.h:598

Referenced by AtapiInterrupt(), AtapiInterrupt__(), ConDrvDispatch(), Ext2DeviceControlNormal(), Ext2NotifyChangeDirectory(), FxPkgPnp::HandleQueryInterface(), FxPkgPnp::HandleQueryInterfaceForPowerThread(), FxPkgPdo::HandleQueryInterfaceForReenumerate(), IKsAllocator_DispatchClose(), IKsAllocator_DispatchDeviceIoControl(), IKsAllocator_fnDeviceIoControl(), IKsClock_DispatchClose(), IKsClock_DispatchDeviceIoControl(), IKsDevice_Pnp(), IKsDevice_PnpStartDevice(), IKsDevice_Power(), IKsFilter_DispatchClose(), IKsFilter_DispatchCreateNode(), IKsFilter_DispatchCreatePin(), IKsFilter_DispatchDeviceIoControl(), IKsFilter_GetFilterFromIrp(), IKsFilterFactory_Create(), IKsPin_Close(), IKsPin_DispatchCreateAllocator(), IKsPin_DispatchCreateClock(), IKsPin_DispatchCreateNode(), IKsPin_DispatchDeviceIoControl(), IKsPin_DispatchKsStream(), KopDispatchClose(), KopDispatchCreate(), KsAddIrpToCancelableQueue(), KsCancelRoutine(), KsCompletePendingRequest(), KsDefaultDeviceIoCompletion(), KsDispatchInvalidDeviceRequest(), KsDispatchQuerySecurity(), KsDispatchSetSecurity(), KspCompletePendingIrps(), KspCreate(), KspDispatchIrp(), RamdiskDeviceControl(), and UDFNotifyChangeDirectory().

◆ ConDrvDispatch()

NTSTATUS NTAPI ConDrvDispatch ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 31 of file dispatch.c.

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}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define DPRINT1
Definition: precomp.h:8
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define HANDLE_CTRL_CODE(Code)
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
#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
uint32_t ULONG
Definition: typedefs.h:59
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
#define IRP_MJ_DEVICE_CHANGE
#define IRP_MJ_QUERY_EA
#define IRP_MJ_CREATE_NAMED_PIPE
#define IRP_MJ_CREATE_MAILSLOT
#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