ReactOS 0.4.15-dev-7887-g64a59a1
kmtest_standalone.c File Reference
#include <ntddk.h>
#include <ntifs.h>
#include <ndk/ketypes.h>
#include <kmt_test.h>
#include <debug.h>
#include <kmt_public.h>
Include dependency graph for kmtest_standalone.c:

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_ENTRYPKMT_IRP_HANDLER_ENTRY
 
typedef struct KMT_MESSAGE_HANDLER_ENTRYPKMT_MESSAGE_HANDLER_ENTRY
 

Functions

DriverEntry

Driver entry point.

Parameters
DriverObjectDriver Object
RegistryPathDriver Registry Path
Returns
Status
NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 
DriverUnload

Driver cleanup funtion.

Parameters
DriverObjectDriver Object
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

Parameters
MajorFunctionIRP major function code to be handled
DeviceObjectDevice Object to handle IRPs for. Can be NULL to indicate any device object
IrpHandlerHandler function to register.
Returns
Status
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

Parameters
MajorFunctionIRP major function code of the handler to be removed
DeviceObjectDevice Object to of the handler to be removed
IrpHandlerHandler function of the handler to be removed
Returns
Status
NTSTATUS KmtUnregisterIrpHandler (IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
 
DriverDispatch

Driver Dispatch function

Parameters
DeviceObjectDevice Object
IrpI/O request packet
Returns
Status
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!

Parameters
ControlCodeControl code to be handled, as passed by the application. Can be 0 to indicate any control code
DeviceObjectDevice Object to handle IRPs for. Can be NULL to indicate any device object
MessageHandlerHandler function to register.
Returns
Status
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

Parameters
ControlCodeControl code of the handler to be removed
DeviceObjectDevice Object to of the handler to be removed
MessageHandlerHandler function of the handler to be removed
Returns
Status
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

Parameters
DeviceObjectDevice Object. This is guaranteed not to have been touched by the dispatch function before the call to the IRP handler
IrpDevice Object. This is guaranteed not to have been touched by the dispatch function before the call to the IRP handler, except for passing it to IoGetCurrentStackLocation
IoStackLocationDevice Object. This is guaranteed not to have been touched by the dispatch function before the call to the IRP handler
Returns
Status
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 } }
 

Macro Definition Documentation

◆ KMT_DEFINE_TEST_FUNCTIONS

#define KMT_DEFINE_TEST_FUNCTIONS

Definition at line 12 of file kmtest_standalone.c.

◆ KMT_MAX_IRP_HANDLERS

#define KMT_MAX_IRP_HANDLERS   256

Definition at line 45 of file kmtest_standalone.c.

◆ KMT_MAX_MESSAGE_HANDLERS

#define KMT_MAX_MESSAGE_HANDLERS   256

Definition at line 47 of file kmtest_standalone.c.

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file kmtest_standalone.c.

Typedef Documentation

◆ PKMT_IRP_HANDLER_ENTRY

◆ PKMT_MESSAGE_HANDLER_ENTRY

Function Documentation

◆ DeviceControlHandler()

static NTSTATUS DeviceControlHandler ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PIO_STACK_LOCATION  IoStackLocation 
)
static

Definition at line 467 of file kmtest_standalone.c.

471{
473 ULONG ControlCode = (IoStackLocation->Parameters.DeviceIoControl.IoControlCode & 0x00000FFC) >> 2;
474 SIZE_T OutLength = IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength;
475 int i;
476
477 for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i)
478 {
479 if ((MessageHandlers[i].ControlCode == 0 ||
482 MessageHandlers[i].MessageHandler != NULL)
483 {
484 Status = MessageHandlers[i].MessageHandler(DeviceObject, ControlCode, Irp->AssociatedIrp.SystemBuffer,
485 IoStackLocation->Parameters.DeviceIoControl.InputBufferLength,
486 &OutLength);
487 break;
488 }
489 }
490
491 Irp->IoStatus.Status = Status;
492 Irp->IoStatus.Information = OutLength;
493
495
496 return Status;
497}
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
Status
Definition: gdiplustypes.h:25
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
static KMT_MESSAGE_HANDLER_ENTRY MessageHandlers[KMT_MAX_MESSAGE_HANDLERS]
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_SUCCESS
Definition: shellext.h:65
PKMT_MESSAGE_HANDLER MessageHandler
PDEVICE_OBJECT DeviceObject
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
#define IO_NO_INCREMENT
Definition: iotypes.h:598

◆ DriverDispatch()

static NTSTATUS NTAPI DriverDispatch ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
static

Definition at line 305 of file kmtest_standalone.c.

308{
310 PIO_STACK_LOCATION IoStackLocation;
311 int i;
312
313 IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
314
315 DPRINT("DriverDispatch: Function=%s, Device=%p\n",
316 KmtMajorFunctionNames[IoStackLocation->MajorFunction],
318
319 for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i)
320 {
321 if (IrpHandlers[i].MajorFunction == IoStackLocation->MajorFunction &&
324 return IrpHandlers[i].IrpHandler(DeviceObject, Irp, IoStackLocation);
325 }
326
327 /* default handler for DeviceControl */
328 if (IoStackLocation->MajorFunction == IRP_MJ_DEVICE_CONTROL ||
330 return DeviceControlHandler(DeviceObject, Irp, IoStackLocation);
331
332 /* Return success for create, close, and cleanup */
333 if (IoStackLocation->MajorFunction == IRP_MJ_CREATE ||
334 IoStackLocation->MajorFunction == IRP_MJ_CLOSE ||
335 IoStackLocation->MajorFunction == IRP_MJ_CLEANUP)
337
338 /* default handler */
339 Irp->IoStatus.Status = Status;
340 Irp->IoStatus.Information = 0;
341
343
344 return Status;
345}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
PCSTR KmtMajorFunctionNames[]
static KMT_IRP_HANDLER_ENTRY IrpHandlers[KMT_MAX_IRP_HANDLERS]
static KMT_IRP_HANDLER DeviceControlHandler
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define DPRINT
Definition: sndvol32.h:71
PDEVICE_OBJECT DeviceObject
PKMT_IRP_HANDLER IrpHandler
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MJ_CLEANUP

◆ DriverEntry()

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

Definition at line 64 of file kmtest_standalone.c.

67{
69 WCHAR DeviceNameBuffer[128] = L"\\Device\\Kmtest-";
70 UNICODE_STRING KmtestDeviceName;
72 PKMT_DEVICE_EXTENSION KmtestDeviceExtension;
74 PCWSTR DeviceNameSuffix;
75 INT Flags = 0;
76 int i;
77 PKPRCB Prcb;
78
79 PAGED_CODE();
80
81 DPRINT("DriverEntry\n");
82
83 Prcb = KeGetCurrentPrcb();
86
87 /* get the Kmtest device, so that we get a ResultBuffer pointer */
90
91 if (!NT_SUCCESS(Status))
92 {
93 DPRINT1("Failed to get Kmtest device object pointer\n");
94 goto cleanup;
95 }
96
98
99 if (!NT_SUCCESS(Status))
100 {
101 DPRINT1("Failed to reference Kmtest device object\n");
102 goto cleanup;
103 }
104
107 KmtestDeviceExtension = KmtestDeviceObject->DeviceExtension;
108 ResultBuffer = KmtestDeviceExtension->ResultBuffer;
109 DPRINT("KmtestDeviceObject: %p\n", (PVOID)KmtestDeviceObject);
110 DPRINT("KmtestDeviceExtension: %p\n", (PVOID)KmtestDeviceExtension);
111 DPRINT("Setting ResultBuffer: %p\n", (PVOID)ResultBuffer);
112
113 /* call TestEntry */
114 RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
115 DeviceName.MaximumLength = sizeof DeviceNameBuffer;
116 TestEntry(DriverObject, RegistryPath, &DeviceNameSuffix, &Flags);
117
118 /* create test device */
119 if (!(Flags & TESTENTRY_NO_CREATE_DEVICE))
120 {
121 RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix);
125 (Flags & TESTENTRY_NO_READONLY_DEVICE ? 0 : FILE_READ_ONLY_DEVICE),
126 Flags & TESTENTRY_NO_EXCLUSIVE_DEVICE ? FALSE : TRUE,
128
129 if (!NT_SUCCESS(Status))
130 {
131 DPRINT1("Could not create device object %wZ\n", &DeviceName);
132 goto cleanup;
133 }
134
135 if (Flags & TESTENTRY_BUFFERED_IO_DEVICE)
137
138 DPRINT("DriverEntry. Created DeviceObject %p\n",
140 }
141
142 /* initialize dispatch functions */
143 if (!(Flags & TESTENTRY_NO_REGISTER_UNLOAD))
144 DriverObject->DriverUnload = DriverUnload;
145 if (!(Flags & TESTENTRY_NO_REGISTER_DISPATCH))
146 for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i)
147 DriverObject->MajorFunction[i] = DriverDispatch;
148
149cleanup:
151 {
154 }
155
157 {
162 }
163
164 return Status;
165}
#define PAGED_CODE()
static void TestEntry(const ENTRY *pEntry)
static OBJECT_ATTRIBUTES KmtestFileObject
#define DPRINT1
Definition: precomp.h:8
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static void cleanup(void)
Definition: main.c:1335
#define DO_BUFFERED_IO
Definition: env_spec_w32.h:394
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
Definition: string_lib.cpp:62
#define KMTEST_DEVICE_DRIVER_PATH
Definition: kmt_public.h:34
PKMT_RESULTBUFFER ResultBuffer
BOOLEAN KmtIsCheckedBuild
BOOLEAN KmtIsMultiProcessorBuild
static PDEVICE_OBJECT TestDeviceObject
static PDEVICE_OBJECT KmtestDeviceObject
static DRIVER_DISPATCH DriverDispatch
static DRIVER_UNLOAD DriverUnload
if(dx< 0)
Definition: linetemp.h:194
#define KernelMode
Definition: asm.h:34
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1148
#define PRCB_BUILD_UNIPROCESSOR
Definition: ketypes.h:309
#define PRCB_BUILD_DEBUG
Definition: ketypes.h:308
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FILE_READ_ONLY_DEVICE
Definition: nt_native.h:808
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1435
#define L(x)
Definition: ntvdm.h:50
NTSTATUS NTAPI ObReferenceObjectByPointer(IN PVOID Object, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode)
Definition: obref.c:381
#define FILE_DEVICE_UNKNOWN
Definition: winioctl.h:140
PVOID DeviceExtension
Definition: env_spec_w32.h:418
UCHAR BuildType
Definition: ketypes.h:669
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
* PFILE_OBJECT
Definition: iotypes.h:1998
#define IRP_MJ_MAXIMUM_FUNCTION
#define ObDereferenceObject
Definition: obfuncs.h:203
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ DriverUnload()

static VOID NTAPI DriverUnload ( IN PDRIVER_OBJECT  DriverObject)
static

Definition at line 178 of file kmtest_standalone.c.

180{
181 PAGED_CODE();
182
184
185 DPRINT("DriverUnload\n");
186
188
191
194}
VOID TestUnload(IN PDRIVER_OBJECT DriverObject)
Definition: Example_drv.c:93
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ KmtRegisterIrpHandler()

NTSTATUS KmtRegisterIrpHandler ( IN UCHAR  MajorFunction,
IN PDEVICE_OBJECT DeviceObject  OPTIONAL,
IN PKMT_IRP_HANDLER  IrpHandler 
)

Definition at line 214 of file kmtest_standalone.c.

218{
220 int i;
221
223 {
225 goto cleanup;
226 }
227
228 if (IrpHandler == NULL)
229 {
231 goto cleanup;
232 }
233
234 for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i)
235 if (IrpHandlers[i].IrpHandler == NULL)
236 {
239 IrpHandlers[i].IrpHandler = IrpHandler;
240 goto cleanup;
241 }
242
244
245cleanup:
246 return Status;
247}
#define STATUS_ALLOTTED_SPACE_EXCEEDED
Definition: ntstatus.h:389
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:475
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
UCHAR MajorFunction

Referenced by TestEntry(), and TestPoRequestPowerIrp().

◆ KmtRegisterMessageHandler()

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.

372{
374 int i;
375
376 if (ControlCode >= 0x400)
377 {
379 goto cleanup;
380 }
381
382 if (MessageHandler == NULL)
383 {
385 goto cleanup;
386 }
387
388 for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i)
389 if (MessageHandlers[i].MessageHandler == NULL)
390 {
393 MessageHandlers[i].MessageHandler = MessageHandler;
394 goto cleanup;
395 }
396
398
399cleanup:
400 return Status;
401}
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
ULONG ControlCode

Referenced by TestEntry().

◆ KmtUnregisterIrpHandler()

NTSTATUS KmtUnregisterIrpHandler ( IN UCHAR  MajorFunction,
IN PDEVICE_OBJECT DeviceObject  OPTIONAL,
IN PKMT_IRP_HANDLER  IrpHandler 
)

Definition at line 267 of file kmtest_standalone.c.

271{
273 int i;
274
275 for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i)
278 IrpHandlers[i].IrpHandler == IrpHandler)
279 {
281 goto cleanup;
282 }
283
285
286cleanup:
287 return Status;
288}
#define STATUS_NOT_FOUND
Definition: shellext.h:72

Referenced by TestPoRequestPowerIrp().

◆ KmtUnregisterMessageHandler()

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.

425{
427 int i;
428
429 for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i)
432 MessageHandlers[i].MessageHandler == MessageHandler)
433 {
435 goto cleanup;
436 }
437
439
440cleanup:
441 return Status;
442}

Variable Documentation

◆ DeviceControlHandler

KMT_IRP_HANDLER DeviceControlHandler
static

Definition at line 39 of file kmtest_standalone.c.

Referenced by DriverDispatch().

◆ DriverDispatch

DRIVER_DISPATCH DriverDispatch
static

Definition at line 38 of file kmtest_standalone.c.

Referenced by DriverEntry().

◆ DriverEntry

DRIVER_INITIALIZE DriverEntry

Definition at line 36 of file kmtest_standalone.c.

◆ DriverUnload

DRIVER_UNLOAD DriverUnload
static

Definition at line 37 of file kmtest_standalone.c.

Referenced by DriverEntry().

◆ IrpHandlers

KMT_IRP_HANDLER_ENTRY IrpHandlers[KMT_MAX_IRP_HANDLERS] = { { 0 } }
static

◆ KmtestDeviceObject

PDEVICE_OBJECT KmtestDeviceObject
static

Definition at line 43 of file kmtest_standalone.c.

Referenced by DriverEntry(), and DriverUnload().

◆ MessageHandlers

◆ TestDeviceObject

PDEVICE_OBJECT TestDeviceObject
static

Definition at line 42 of file kmtest_standalone.c.

Referenced by DriverEntry(), and DriverUnload().