@@ -27,17 +27,17 @@ class device_dispatch_invoker {
27
27
static status invoke (PDEVICE_OBJECT device_object, PIRP irp) noexcept {
28
28
NTSTATUS status = STATUS_INVALID_DEVICE_REQUEST;
29
29
irp->IoStatus .Information = 0 ;
30
- auto dispatcher = this_driver->dispatchers (device_object);
31
- if (dispatcher ) {
30
+ auto dispatchers = this_driver->dispatchers (device_object);
31
+ if (dispatchers ) {
32
32
PIO_STACK_LOCATION irp_sp = IoGetCurrentIrpStackLocation (irp);
33
33
switch (irp_sp->MajorFunction ) {
34
34
case IRP_MJ_CREATE:
35
35
case IRP_MJ_CLOSE:
36
- if (dispatcher ->on_device_control )
36
+ if (dispatchers ->on_device_control )
37
37
status = STATUS_SUCCESS;
38
38
break ;
39
39
case IRP_MJ_DEVICE_CONTROL:
40
- if (dispatcher ->on_device_control ) {
40
+ if (dispatchers ->on_device_control ) {
41
41
auto ret = ntl::seh::try_except ([&]() {
42
42
const void *in_buf_ptr;
43
43
void *out_buf_ptr;
@@ -73,17 +73,15 @@ class device_dispatch_invoker {
73
73
" Invalid control code method" );
74
74
break ;
75
75
}
76
-
77
76
device_control::code code (
78
77
irp_sp->Parameters .DeviceIoControl .IoControlCode );
79
78
device_control::in_buffer in_buf (
80
79
in_buf_ptr,
81
80
irp_sp->Parameters .DeviceIoControl .InputBufferLength );
82
81
device_control::out_buffer out_buf (out_buf_ptr, out_len);
83
- dispatcher ->on_device_control (code, in_buf, out_buf);
82
+ dispatchers ->on_device_control (code, in_buf, out_buf);
84
83
status = STATUS_SUCCESS;
85
84
irp->IoStatus .Information = (ULONG_PTR)out_buf.size ;
86
-
87
85
} catch (const ntl::exception &e) {
88
86
status = e.get_status ();
89
87
irp->IoStatus .Information = 0 ;
0 commit comments