| 40 | #endif |
| 41 | |
| 42 | NTSTATUS |
| 43 | loaderQueueInitialize(_In_ WDFDEVICE Device) |
| 44 | /*++ |
| 45 | |
| 46 | Routine Description: |
| 47 | |
| 48 | The I/O dispatch callbacks for the frameworks device object |
| 49 | are configured in this function. |
| 50 | |
| 51 | A single default I/O Queue is configured for parallel request |
| 52 | processing, and a driver context memory allocation is created |
| 53 | to hold our structure QUEUE_CONTEXT. |
| 54 | |
| 55 | Arguments: |
| 56 | |
| 57 | Device - Handle to a framework device object. |
| 58 | |
| 59 | Return Value: |
| 60 | |
| 61 | VOID |
| 62 | |
| 63 | --*/ |
| 64 | { |
| 65 | WDFQUEUE queue; |
| 66 | NTSTATUS status; |
| 67 | WDF_IO_QUEUE_CONFIG queueConfig; |
| 68 | |
| 69 | PAGED_CODE(); |
| 70 | |
| 71 | // |
| 72 | // Configure a default queue so that requests that are not |
| 73 | // configure-fowarded using WdfDeviceConfigureRequestDispatching to goto |
| 74 | // other queues get dispatched here. |
| 75 | // |
| 76 | WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel); |
| 77 | |
| 78 | queueConfig.EvtIoDeviceControl = loaderEvtIoDeviceControl; |
| 79 | queueConfig.EvtIoStop = loaderEvtIoStop; |
| 80 | |
| 81 | status = WdfIoQueueCreate(Device, &queueConfig, WDF_NO_OBJECT_ATTRIBUTES, &queue); |
| 82 | |
| 83 | if (!NT_SUCCESS(status)) { |
| 84 | TraceEvents(TRACE_LEVEL_ERROR, TRACE_QUEUE, "WdfIoQueueCreate failed %!STATUS!", status); |
| 85 | return status; |
| 86 | } |
| 87 | |
| 88 | return status; |
| 89 | } |
| 90 | |
| 91 | VOID |
| 92 | loaderEvtIoDeviceControl( |
no outgoing calls
no test coverage detected