ReactOS 0.4.15-dev-7681-g776c3a3
iocomp.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/io/iomgr/iocomp.c
5 * PURPOSE: I/O Wrappers (called Completion Ports) for Kernel Queues
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 * Thomas Weidenmueller (w3seek@reactos.org)
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include <ntoskrnl.h>
13#define NDEBUG
14#include <debug.h>
15
17
19
21{
26};
27
29{
30 /* IoCompletionBasicInformation */
32};
33
34/* PRIVATE FUNCTIONS *********************************************************/
35
39 IN PIRP Irp,
41{
44
45 /* Reference the device object */
46 ObReferenceObject(UnsafeContext->DeviceObject);
47
48 /* Call the completion routine */
50 Irp,
51 UnsafeContext->Context);
52
53 /* Dereference the device object */
54 ObDereferenceObject(UnsafeContext->DeviceObject);
55
56 /* Free our context */
57 ExFreePool(UnsafeContext);
58 return Status;
59}
60
61VOID
64{
65 PKPRCB Prcb = KeGetCurrentPrcb();
67
68 /* Use the P List */
70 PPLookasideList[LookasideCompletionList].P;
71 List->L.TotalFrees++;
72
73 /* Check if the Free was within the Depth or not */
74 if (ExQueryDepthSList(&List->L.ListHead) >= List->L.Depth)
75 {
76 /* Let the balancer know */
77 List->L.FreeMisses++;
78
79 /* Use the L List */
81 PPLookasideList[LookasideCompletionList].L;
82 List->L.TotalFrees++;
83
84 /* Check if the Free was within the Depth or not */
85 if (ExQueryDepthSList(&List->L.ListHead) >= List->L.Depth)
86 {
87 /* All lists failed, use the pool */
88 List->L.FreeMisses++;
90 return;
91 }
92 }
93
94 /* The free was within dhe Depth */
96}
97
98VOID
101{
102 PKQUEUE Queue = ObjectBody;
103 PLIST_ENTRY FirstEntry;
104 PLIST_ENTRY CurrentEntry;
105 PIRP Irp;
107
108 /* Rundown the Queue */
109 FirstEntry = KeRundownQueue(Queue);
110 if (FirstEntry)
111 {
112 /* Loop the packets */
113 CurrentEntry = FirstEntry;
114 do
115 {
116 /* Get the Packet */
117 Packet = CONTAINING_RECORD(CurrentEntry,
119 ListEntry);
120
121 /* Go to next Entry */
122 CurrentEntry = CurrentEntry->Flink;
123
124 /* Check if it's part of an IRP, or a separate packet */
125 if (Packet->PacketType == IopCompletionPacketIrp)
126 {
127 /* Get the IRP and free it */
128 Irp = CONTAINING_RECORD(Packet, IRP, Tail.Overlay.ListEntry);
129 IoFreeIrp(Irp);
130 }
131 else
132 {
133 /* Use common routine */
135 }
136 } while (FirstEntry != CurrentEntry);
137 }
138}
139
140/* PUBLIC FUNCTIONS **********************************************************/
141
142/*
143 * @implemented
144 */
146NTAPI
148 IN PVOID KeyContext,
151 IN ULONG_PTR IoStatusInformation,
152 IN BOOLEAN Quota)
153{
156 PKPRCB Prcb = KeGetCurrentPrcb();
158
159 /* Get the P List */
161 PPLookasideList[LookasideCompletionList].P;
162
163 /* Try to allocate the Packet */
164 List->L.TotalAllocates++;
165 Packet = (PVOID)InterlockedPopEntrySList(&List->L.ListHead);
166
167 /* Check if that failed, use the L list if it did */
168 if (!Packet)
169 {
170 /* Let the balancer know */
171 List->L.AllocateMisses++;
172
173 /* Get L List */
175 PPLookasideList[LookasideCompletionList].L;
176
177 /* Try to allocate the Packet */
178 List->L.TotalAllocates++;
179 Packet = (PVOID)InterlockedPopEntrySList(&List->L.ListHead);
180 }
181
182 /* Still failed, use pool */
183 if (!Packet)
184 {
185 /* Let the balancer know */
186 List->L.AllocateMisses++;
187
188 /* Allocate from Nonpaged Pool */
190 }
191
192 /* Make sure we have one by now... */
193 if (Packet)
194 {
195 /* Set up the Packet */
196 Packet->PacketType = IopCompletionPacketMini;
197 Packet->KeyContext = KeyContext;
198 Packet->ApcContext = ApcContext;
199 Packet->IoStatus = IoStatus;
200 Packet->IoStatusInformation = IoStatusInformation;
201
202 /* Insert the Queue */
203 KeInsertQueue(Queue, &Packet->ListEntry);
204 }
205 else
206 {
207 /* Out of memory, fail */
209 }
210
211 /* Return Success */
212 return STATUS_SUCCESS;
213}
214
215/*
216 * @implemented
217 */
219NTAPI
221 IN PIRP Irp,
227{
229
230 /* Allocate the context */
231 UnloadContext = ExAllocatePoolWithTag(NonPagedPool,
232 sizeof(*UnloadContext),
233 'sUoI');
234 if (!UnloadContext) return STATUS_INSUFFICIENT_RESOURCES;
235
236 /* Set up the context */
237 UnloadContext->DeviceObject = DeviceObject;
238 UnloadContext->Context = Context;
239 UnloadContext->CompletionRoutine = CompletionRoutine;
240
241 /* Now set the completion routine */
244 UnloadContext,
248 return STATUS_SUCCESS;
249}
250
252NTAPI
256 IN ULONG NumberOfConcurrentThreads)
257{
259 HANDLE hIoCompletionHandle;
262 PAGED_CODE();
263
264 /* Check if this was a user-mode call */
266 {
267 /* Wrap probing in SEH */
269 {
270 /* Probe the handle */
271 ProbeForWriteHandle(IoCompletionHandle);
272 }
274 {
275 /* Return the exception code */
277 }
278 _SEH2_END;
279 }
280
281 /* Create the Object */
286 NULL,
287 sizeof(KQUEUE),
288 0,
289 0,
290 (PVOID*)&Queue);
291 if (NT_SUCCESS(Status))
292 {
293 /* Initialize the Queue */
294 KeInitializeQueue(Queue, NumberOfConcurrentThreads);
295
296 /* Insert it */
298 NULL,
300 0,
301 NULL,
302 &hIoCompletionHandle);
303 if (NT_SUCCESS(Status))
304 {
305 /* Protect writing the handle in SEH */
307 {
308 /* Write the handle back */
309 *IoCompletionHandle = hIoCompletionHandle;
310 }
312 {
313 /* Get the exception code */
315 }
316 _SEH2_END;
317 }
318 }
319
320 /* Return Status */
321 return Status;
322}
323
325NTAPI
326NtOpenIoCompletion(OUT PHANDLE IoCompletionHandle,
329{
331 HANDLE hIoCompletionHandle;
333 PAGED_CODE();
334
335 /* Check if this was a user-mode call */
337 {
338 /* Wrap probing in SEH */
340 {
341 /* Probe the handle */
342 ProbeForWriteHandle(IoCompletionHandle);
343 }
345 {
346 /* Return the exception code */
348 }
349 _SEH2_END;
350 }
351
352 /* Open the Object */
356 NULL,
358 NULL,
359 &hIoCompletionHandle);
360 if (NT_SUCCESS(Status))
361 {
362 /* Protect writing the handle in SEH */
364 {
365 /* Write the handle back */
366 *IoCompletionHandle = hIoCompletionHandle;
367 }
369 {
370 /* Get the exception code */
372 }
373 _SEH2_END;
374 }
375
376 /* Return Status */
377 return Status;
378}
379
381NTAPI
382NtQueryIoCompletion(IN HANDLE IoCompletionHandle,
383 IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
384 OUT PVOID IoCompletionInformation,
385 IN ULONG IoCompletionInformationLength,
387{
391 PAGED_CODE();
392
393 /* Check buffers and parameters */
394 Status = DefaultQueryInfoBufferCheck(IoCompletionInformationClass,
396 sizeof(IoCompletionInfoClass) /
397 sizeof(IoCompletionInfoClass[0]),
399 IoCompletionInformation,
400 IoCompletionInformationLength,
402 NULL,
404 if (!NT_SUCCESS(Status)) return Status;
405
406 /* Get the Object */
407 Status = ObReferenceObjectByHandle(IoCompletionHandle,
411 (PVOID*)&Queue,
412 NULL);
413 if (NT_SUCCESS(Status))
414 {
415 /* Protect write in SEH */
417 {
418 /* Return Info */
419 ((PIO_COMPLETION_BASIC_INFORMATION)IoCompletionInformation)->
421
422 /* Return Result Length if needed */
423 if (ResultLength)
424 {
426 }
427 }
429 {
430 /* Get exception code */
432 }
433 _SEH2_END;
434
435 /* Dereference the queue */
437 }
438
439 /* Return Status */
440 return Status;
441}
442
444NTAPI
445NtRemoveIoCompletion(IN HANDLE IoCompletionHandle,
446 OUT PVOID *KeyContext,
450{
451 LARGE_INTEGER SafeTimeout;
454 PLIST_ENTRY ListEntry;
457 PIRP Irp;
458 PVOID Apc, Key;
460 PAGED_CODE();
461
462 /* Check if the call was from user mode */
464 {
465 /* Protect probes in SEH */
467 {
468 /* Probe the pointers */
469 ProbeForWritePointer(KeyContext);
471
472 /* Probe the I/O Status Block */
474 if (Timeout)
475 {
476 /* Probe and capture the timeout */
477 SafeTimeout = ProbeForReadLargeInteger(Timeout);
478 Timeout = &SafeTimeout;
479 }
480 }
482 {
483 /* Return the exception code */
485 }
486 _SEH2_END;
487 }
488
489 /* Open the Object */
490 Status = ObReferenceObjectByHandle(IoCompletionHandle,
494 (PVOID*)&Queue,
495 NULL);
496 if (NT_SUCCESS(Status))
497 {
498 /* Remove queue */
500
501 /* If we got a timeout or user_apc back, return the status */
502 if (((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_TIMEOUT) ||
503 ((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_USER_APC))
504 {
505 /* Set this as the status */
506 Status = (NTSTATUS)(ULONG_PTR)ListEntry;
507 }
508 else
509 {
510 /* Get the Packet Data */
511 Packet = CONTAINING_RECORD(ListEntry,
513 ListEntry);
514
515 /* Check if this is piggybacked on an IRP */
516 if (Packet->PacketType == IopCompletionPacketIrp)
517 {
518 /* Get the IRP */
519 Irp = CONTAINING_RECORD(ListEntry,
520 IRP,
521 Tail.Overlay.ListEntry);
522
523 /* Save values */
524 Key = Irp->Tail.CompletionKey;
525 Apc = Irp->Overlay.AsynchronousParameters.UserApcContext;
526 IoStatus = Irp->IoStatus;
527
528 /* Free the IRP */
529 IoFreeIrp(Irp);
530 }
531 else
532 {
533 /* Save values */
534 Key = Packet->KeyContext;
535 Apc = Packet->ApcContext;
536 IoStatus.Status = Packet->IoStatus;
537 IoStatus.Information = Packet->IoStatusInformation;
538
539 /* Free the packet */
541 }
542
543 /* Enter SEH to write back the values */
545 {
546 /* Write the values to caller */
547 *ApcContext = Apc;
548 *KeyContext = Key;
550 }
552 {
553 /* Get the exception code */
555 }
556 _SEH2_END;
557 }
558
559 /* Dereference the Object */
561 }
562
563 /* Return status */
564 return Status;
565}
566
568NTAPI
569NtSetIoCompletion(IN HANDLE IoCompletionPortHandle,
570 IN PVOID CompletionKey,
572 IN NTSTATUS CompletionStatus,
573 IN ULONG CompletionInformation)
574{
577 PAGED_CODE();
578
579 /* Get the Object */
580 Status = ObReferenceObjectByHandle(IoCompletionPortHandle,
584 (PVOID*)&Queue,
585 NULL);
586 if (NT_SUCCESS(Status))
587 {
588 /* Set the Completion */
590 CompletionKey,
592 CompletionStatus,
593 CompletionInformation,
594 TRUE);
595
596 /* Dereference the object */
598 }
599
600 /* Return status */
601 return Status;
602}
#define PAGED_CODE()
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define NTSTATUS
Definition: precomp.h:21
NTSTATUS NTAPI IoCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Ctx)
Definition: control.c:382
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
#define ExGetPreviousMode
Definition: ex.h:140
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
Status
Definition: gdiplustypes.h:25
LONG NTAPI ExSystemExceptionFilter(VOID)
Definition: harderr.c:349
#define ICIF_QUERY
Definition: icif.h:18
#define IQS_SAME(Type, Alignment, Flags)
Definition: icif.h:37
#define ICIF_PROBE_READ_WRITE
Definition: icif.h:24
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
POBJECT_TYPE IoCompletionType
Definition: iocomp.c:16
NTSTATUS NTAPI IoSetCompletionRoutineEx(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_COMPLETION_ROUTINE CompletionRoutine, IN PVOID Context, IN BOOLEAN InvokeOnSuccess, IN BOOLEAN InvokeOnError, IN BOOLEAN InvokeOnCancel)
Definition: iocomp.c:220
NTSTATUS NTAPI NtSetIoCompletion(IN HANDLE IoCompletionPortHandle, IN PVOID CompletionKey, IN PVOID CompletionContext, IN NTSTATUS CompletionStatus, IN ULONG CompletionInformation)
Definition: iocomp.c:569
NTSTATUS NTAPI NtRemoveIoCompletion(IN HANDLE IoCompletionHandle, OUT PVOID *KeyContext, OUT PVOID *ApcContext, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: iocomp.c:445
NTSTATUS NTAPI NtOpenIoCompletion(OUT PHANDLE IoCompletionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: iocomp.c:326
GENERAL_LOOKASIDE IoCompletionPacketLookaside
Definition: iocomp.c:18
NTSTATUS NTAPI NtQueryIoCompletion(IN HANDLE IoCompletionHandle, IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass, OUT PVOID IoCompletionInformation, IN ULONG IoCompletionInformationLength, OUT PULONG ResultLength OPTIONAL)
Definition: iocomp.c:382
NTSTATUS NTAPI NtCreateIoCompletion(OUT PHANDLE IoCompletionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG NumberOfConcurrentThreads)
Definition: iocomp.c:253
static const INFORMATION_CLASS_INFO IoCompletionInfoClass[]
Definition: iocomp.c:28
NTSTATUS NTAPI IoSetIoCompletion(IN PVOID IoCompletion, IN PVOID KeyContext, IN PVOID ApcContext, IN NTSTATUS IoStatus, IN ULONG_PTR IoStatusInformation, IN BOOLEAN Quota)
Definition: iocomp.c:147
NTSTATUS NTAPI IopUnloadSafeCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: iocomp.c:38
VOID NTAPI IopDeleteIoCompletion(PVOID ObjectBody)
Definition: iocomp.c:100
VOID NTAPI IopFreeMiniPacket(PIOP_MINI_COMPLETION_PACKET Packet)
Definition: iocomp.c:63
GENERIC_MAPPING IopCompletionMapping
Definition: iocomp.c:20
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:490
if(dx< 0)
Definition: linetemp.h:194
#define IO_COMPLETION_ALL_ACCESS
Definition: file.c:72
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
#define KernelMode
Definition: asm.h:34
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1148
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID ApcContext
Definition: iofuncs.h:727
#define IO_COMPLETION_MODIFY_STATE
Definition: iotypes.h:33
struct _IO_COMPLETION_BASIC_INFORMATION * PIO_COMPLETION_BASIC_INFORMATION
#define IO_COMPLETION_QUERY_STATE
Definition: iotypes.h:31
enum _IO_COMPLETION_INFORMATION_CLASS IO_COMPLETION_INFORMATION_CLASS
struct _IO_COMPLETION_BASIC_INFORMATION IO_COMPLETION_BASIC_INFORMATION
@ LookasideCompletionList
Definition: mmtypes.h:174
#define SYNCHRONIZE
Definition: nt_native.h:61
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67
@ IopCompletionPacketIrp
Definition: io.h:271
@ IopCompletionPacketMini
Definition: io.h:272
static __inline NTSTATUS DefaultQueryInfoBufferCheck(_In_ ULONG Class, _In_ const INFORMATION_CLASS_INFO *ClassList, _In_ ULONG ClassListEntries, _In_ ULONG Flags, _In_opt_ PVOID Buffer, _In_ ULONG BufferLength, _In_opt_ PULONG ReturnLength, _In_opt_ PULONG_PTR ReturnLengthPtr, _In_ KPROCESSOR_MODE PreviousMode)
Probe helper that validates the provided parameters whenever a NtQuery*** system call is invoked from...
Definition: probe.h:219
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1666
LONG NTAPI KeReadStateQueue(IN PKQUEUE Queue)
Definition: queue.c:226
LONG NTAPI KeInsertQueue(IN PKQUEUE Queue, IN PLIST_ENTRY Entry)
Definition: queue.c:198
PLIST_ENTRY NTAPI KeRundownQueue(IN PKQUEUE Queue)
Definition: queue.c:438
VOID NTAPI KeInitializeQueue(IN PKQUEUE Queue, IN ULONG Count OPTIONAL)
Definition: queue.c:148
PLIST_ENTRY NTAPI KeRemoveQueue(IN PKQUEUE Queue, IN KPROCESSOR_MODE WaitMode, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: queue.c:238
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
#define STATUS_USER_APC
Definition: ntstatus.h:78
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2935
NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN OUT PVOID ParseContext, OUT PHANDLE Handle)
Definition: obhandle.c:2532
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:1039
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
static ULONG Timeout
Definition: ping.c:61
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:162
#define ProbeForWritePointer(Ptr)
Definition: probe.h:42
#define ProbeForWriteHandle(Ptr)
Definition: probe.h:43
#define ProbeForWriteIoStatusBlock(Ptr)
Definition: probe.h:52
#define ProbeForReadLargeInteger(Ptr)
Definition: probe.h:75
#define STATUS_SUCCESS
Definition: shellext.h:65
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PIO_COMPLETION_ROUTINE CompletionRoutine
Definition: io.h:304
PDEVICE_OBJECT DeviceObject
Definition: io.h:302
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define IOC_TAG
Definition: tag.h:69
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE _In_opt_ __drv_aliasesMem WDFCONTEXT CompletionContext
Definition: wdfrequest.h:898
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
FORCEINLINE USHORT ExQueryDepthSList(_In_ PSLIST_HEADER SListHead)
Definition: exfuncs.h:153
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST * PNPAGED_LOOKASIDE_LIST
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
Definition: iofuncs.h:1943
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
Definition: iofuncs.h:1944
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
Definition: iofuncs.h:1942
IO_COMPLETION_ROUTINE * PIO_COMPLETION_ROUTINE
Definition: iotypes.h:2835
struct _KQUEUE * PKQUEUE
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define ObDereferenceObject
Definition: obfuncs.h:203
#define ObReferenceObject
Definition: obfuncs.h:204
#define InterlockedPushEntrySList(SListHead, SListEntry)
Definition: rtlfuncs.h:3389
#define InterlockedPopEntrySList(SListHead)
Definition: rtlfuncs.h:3392
#define PSLIST_ENTRY
Definition: rtltypes.h:134
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103