ReactOS 0.4.16-dev-751-g45ed1a9
|
#include <ntddk.h>
#include <ntifs.h>
#include <ndk/ketypes.h>
#include <kmt_test.h>
#include <debug.h>
#include <kmt_public.h>
Go to the source code of this file.
Classes | |
struct | KMT_IRP_HANDLER_ENTRY |
struct | KMT_MESSAGE_HANDLER_ENTRY |
Macros | |
#define | KMT_DEFINE_TEST_FUNCTIONS |
#define | NDEBUG |
#define | KMT_MAX_IRP_HANDLERS 256 |
#define | KMT_MAX_MESSAGE_HANDLERS 256 |
Typedefs | |
typedef struct KMT_IRP_HANDLER_ENTRY * | PKMT_IRP_HANDLER_ENTRY |
typedef struct KMT_MESSAGE_HANDLER_ENTRY * | PKMT_MESSAGE_HANDLER_ENTRY |
Functions | |||||||
DriverEntry | |||||||
Driver entry point.
| |||||||
NTSTATUS NTAPI | DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) | ||||||
DriverUnload | |||||||
Driver cleanup funtion.
| |||||||
static VOID NTAPI | DriverUnload (IN PDRIVER_OBJECT DriverObject) | ||||||
KmtRegisterIrpHandler | |||||||
Register a handler with the IRP Dispatcher. If multiple registered handlers match an IRP, it is unspecified which of them is called on IRP reception
| |||||||
NTSTATUS | KmtRegisterIrpHandler (IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler) | ||||||
KmtUnregisterIrpHandler | |||||||
Unregister a handler with the IRP Dispatcher. Parameters must be specified exactly as in the call to KmtRegisterIrpHandler. Only the first matching entry will be removed if multiple exist
| |||||||
NTSTATUS | KmtUnregisterIrpHandler (IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler) | ||||||
DriverDispatch | |||||||
Driver Dispatch function
| |||||||
static NTSTATUS NTAPI | DriverDispatch (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) | ||||||
KmtRegisterMessageHandler | |||||||
Register a handler with the DeviceControl Dispatcher. If multiple registered handlers match a message, it is unspecified which of them is called on message reception. NOTE: message handlers registered with this function will not be called if a custom IRP handler matching the corresponding IRP is installed!
| |||||||
NTSTATUS | KmtRegisterMessageHandler (IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler) | ||||||
KmtUnregisterMessageHandler | |||||||
Unregister a handler with the DeviceControl Dispatcher. Parameters must be specified exactly as in the call to KmtRegisterMessageHandler. Only the first matching entry will be removed if multiple exist
| |||||||
NTSTATUS | KmtUnregisterMessageHandler (IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler) | ||||||
DeviceControlHandler | |||||||
Default IRP_MJ_DEVICE_CONTROL/IRP_MJ_INTERNAL_DEVICE_CONTROL handler
| |||||||
static NTSTATUS | DeviceControlHandler (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation) | ||||||
Variables | |
DRIVER_INITIALIZE | DriverEntry |
static DRIVER_UNLOAD | DriverUnload |
static DRIVER_DISPATCH | DriverDispatch |
static KMT_IRP_HANDLER | DeviceControlHandler |
static PDEVICE_OBJECT | TestDeviceObject |
static PDEVICE_OBJECT | KmtestDeviceObject |
static KMT_IRP_HANDLER_ENTRY | IrpHandlers [KMT_MAX_IRP_HANDLERS] = { { 0 } } |
static KMT_MESSAGE_HANDLER_ENTRY | MessageHandlers [KMT_MAX_MESSAGE_HANDLERS] = { { 0 } } |
#define KMT_DEFINE_TEST_FUNCTIONS |
Definition at line 12 of file kmtest_standalone.c.
#define KMT_MAX_IRP_HANDLERS 256 |
Definition at line 45 of file kmtest_standalone.c.
#define KMT_MAX_MESSAGE_HANDLERS 256 |
Definition at line 47 of file kmtest_standalone.c.
#define NDEBUG |
Definition at line 15 of file kmtest_standalone.c.
|
static |
Definition at line 467 of file kmtest_standalone.c.
Definition at line 305 of file kmtest_standalone.c.
NTSTATUS NTAPI DriverEntry | ( | IN PDRIVER_OBJECT | DriverObject, |
IN PUNICODE_STRING | RegistryPath | ||
) |
Definition at line 64 of file kmtest_standalone.c.
|
static |
Definition at line 178 of file kmtest_standalone.c.
NTSTATUS KmtRegisterIrpHandler | ( | IN UCHAR | MajorFunction, |
IN PDEVICE_OBJECT DeviceObject | OPTIONAL, | ||
IN PKMT_IRP_HANDLER | IrpHandler | ||
) |
Definition at line 214 of file kmtest_standalone.c.
Referenced by TestEntry(), and TestPoRequestPowerIrp().
NTSTATUS KmtRegisterMessageHandler | ( | IN ULONG ControlCode | OPTIONAL, |
IN PDEVICE_OBJECT DeviceObject | OPTIONAL, | ||
IN PKMT_MESSAGE_HANDLER | MessageHandler | ||
) |
Definition at line 368 of file kmtest_standalone.c.
Referenced by TestEntry().
NTSTATUS KmtUnregisterIrpHandler | ( | IN UCHAR | MajorFunction, |
IN PDEVICE_OBJECT DeviceObject | OPTIONAL, | ||
IN PKMT_IRP_HANDLER | IrpHandler | ||
) |
Definition at line 267 of file kmtest_standalone.c.
Referenced by TestPoRequestPowerIrp().
NTSTATUS KmtUnregisterMessageHandler | ( | IN ULONG ControlCode | OPTIONAL, |
IN PDEVICE_OBJECT DeviceObject | OPTIONAL, | ||
IN PKMT_MESSAGE_HANDLER | MessageHandler | ||
) |
Definition at line 421 of file kmtest_standalone.c.
|
static |
Definition at line 39 of file kmtest_standalone.c.
Referenced by DriverDispatch().
|
static |
Definition at line 38 of file kmtest_standalone.c.
Referenced by DriverEntry().
DRIVER_INITIALIZE DriverEntry |
Definition at line 36 of file kmtest_standalone.c.
|
static |
Definition at line 37 of file kmtest_standalone.c.
Referenced by DriverEntry().
|
static |
Definition at line 46 of file kmtest_standalone.c.
Referenced by DriverDispatch(), KmtRegisterIrpHandler(), and KmtUnregisterIrpHandler().
|
static |
Definition at line 43 of file kmtest_standalone.c.
Referenced by DriverEntry(), and DriverUnload().
|
static |
Definition at line 48 of file kmtest_standalone.c.
Referenced by DeviceControlHandler(), KmtRegisterMessageHandler(), and KmtUnregisterMessageHandler().
|
static |
Definition at line 42 of file kmtest_standalone.c.
Referenced by DriverEntry(), and DriverUnload().