ReactOS 0.4.15-dev-7907-g95bf896
fxrequestbase.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxRequestBase.cpp
8
9Abstract:
10
11 This module implements FxRequestBase object
12
13Author:
14
15Environment:
16
17 Both kernel and user mode
18
19Revision History:
20
21
22
23--*/
24
25#include "coreprivshared.hpp"
26
27// Tracing support
28extern "C" {
29// #include "FxRequestBase.tmh"
30}
31
33 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
34 __in USHORT ObjectSize,
39 ) : FxNonPagedObject(FX_TYPE_REQUEST, ObjectSize, FxDriverGlobals, ObjectType),
40 m_Irp(Irp)
41{
42 //
43 // By default requests cannot be completed except for request associated with
44 // IRP allocated from I/O (upper drivers).
45 //
47
48 //
49 // After is all said and done with assigning to m_IrpAllocation value, if
50 // m_Irp().GetIrp == NULL, then m_IrpAllocation can be overridden in
51 // ValidateTarget.
52 //
54 if (Ownership == FxRequestOwnsIrp) {
55 //
56 // Driver writer gave the irp to the framework but still owns it
57 // or there is no irp passed in when the FxRequest was created.
58 //
60 }
61 else {
62 //
63 // Driver writer gave the irp to the framework but still owns it
64 //
66 }
67
68 //
69 // Cleanup request's context in Dispose. Please see Dispose below
70 // for specific scenario we are trying to fix. Enable Dispose only if
71 // driver is v1.11 or above b/c it may be possible that older driver
72 // may have used invalid/bad scenarios similar to this one:
73 // - create target object.
74 // - create one or more driver created requests parented to the target.
75 // - send one or more of these requests to the target (lower stack).
76 // - delete the target object while requests are pending.
77 // Deleting a target while it has a pending request is a valid
78 // operation, what is not valid is for these request to be also
79 // parented to the target at the same time.
80 // In this scenario if we turn on Dispose, the Dispose callback will
81 // be called before the request is completed.
82 // Note that if the driver had specified any Cleanup callbacks on
83 // these requests, these also are called before the requests are
84 // completed.
85 //
86 if (FxDriverGlobals->IsVersionGreaterThanOrEqualTo(1, 11)) {
88 }
89 }
90 else if (Ownership == FxRequestOwnsIrp) {
91 //
92 // The request will own the irp and free it when the request is freed
93 //
95 }
96 else {
97 //
98 // Request is owned by the io queue
99 //
102 }
103
104 m_Target = NULL;
105 m_TargetFlags = 0;
106
108
111
112 m_PriorityBoost = 0;
113
115 m_Timer = NULL;
116
119
121
123
127
129
130 m_VerifierFlags = 0;
134}
135
137 VOID
138 )
139{
140 MdIrp irp;
141
142 //
143 // Since m_ListEntry is a union with the CSQ context and the irp have just
144 // come off of a CSQ, we cannot be guaranteed that the m_ListEntry is
145 // initialized to point to itself.
146 //
147 // ASSERT(IsListEmpty(&m_ListEntry));
148
149
150#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
151 //
152 // If an MDL is associated with the request, free it
153 //
154 if (m_AllocatedMdl != NULL) {
156 }
157#endif
158
159 irp = m_Irp.GetIrp();
160
161 //
162 // If the request was created through WdfRequestCreate, formatted, and not
163 // reused, we can still have a request context.
164 //
165 if (m_RequestContext != NULL) {
166 if (irp != NULL) {
168 }
169
170 delete m_RequestContext;
171 }
172
174 m_Irp.FreeIrp();
175 }
176
177 if (m_Timer != NULL) {
178 delete m_Timer;
179 }
180}
181
182VOID
184 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals
185 )
186{
187 SHORT flags;
188 KIRQL irql;
189
191
192 Lock(&irql);
193 flags = GetVerifierFlagsLocked();
196 FxDriverGlobals, TRACE_LEVEL_ERROR, TRACINGREQUEST,
197 "Driver is trying to delete WDFREQUEST 0x%p while it is still "
198 "active on WDFIOTARGET 0x%p. ",
199 GetTraceObjectHandle(), GetTarget()->GetHandle());
200 FxVerifierDbgBreakPoint(FxDriverGlobals);
201 }
202 Unlock(irql);
203}
204
207{
208 //
209 // Make sure request is not in use.
210 //
211 VerifyDispose(GetDriverGlobals());
212
213 //
214 // Now call Cleanup on any handle context's exposed
215 // to the device driver.
216 //
217 CallCleanup();
218
219 //
220 // Call the request's cleanup (~dtor or Dispose).
221 //
222 if (m_RequestContext != NULL) {
223 if (IsAllocatedFromIo() == FALSE && m_Irp.GetIrp() != NULL) {
224 //
225 // This code allows the following scenario to work correctly b/c
226 // the original request can be completed without worrying that the
227 // new request's context has references on the original request.
228 //
229 // * Driver receives an ioctl request.
230 // * Driver creates a new request.
231 // * Driver formats the new request with buffers from original ioctl.
232 // * Driver sends the new request synchronously.
233 // * Driver retrieves info/status from the new request.
234 // * Driver deletes the new request.
235 // * Driver completes the original request.
236 //
238
239 //
240 // ~dtor cleans up everything. No need to call its Dispose method.
241 //
242 delete m_RequestContext;
244 }
245 else {
246 //
247 // Let request's context know that Dispose is in progress.
248 // RequestContext may receive the following two calls after Dispose:
249 // . ReleaseAndRestore if an IRP is still present.
250 // . Destructor
251 //
253 }
254 }
255
256 return FALSE;
257}
258
259VOID
261 VOID
262 )
263{
264#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
265 if (m_AllocatedMdl != NULL) {
268 }
269#endif
270
273 m_VerifierFlags = 0;
275
278
280
281 if (m_Timer != NULL) {
282 delete m_Timer;
283 m_Timer = NULL;
284 }
285
286 m_Target = NULL;
287 m_TargetFlags = 0;
289
291
295}
296
301 )
302{
303 MdIrp pIrp, pOldIrp;
304 FxIrp fxIrp;
306
307 pOldIrp = NULL;
308
309 pIrp = GetSubmitIrp();
311
312 //
313 // Must restore to the previous irp in case we reallocate the irp
314 //
316
317 if (Target->HasValidStackSize() == FALSE) {
318
319 //
320 // Target is closed down
321 //
323
325 "WDFIOTARGET %p is closed, cannot validate, %!STATUS!",
326 Target->GetHandle(), status);
327 }
328 else if (pIrp != NULL && Target->HasEnoughStackLocations(&fxIrp)) {
330 }
332 //
333 // Try to allocate a new irp.
334 //
335 pIrp = FxIrp::AllocateIrp(Target->m_TargetStackSize, Target->GetDevice());
336
337 if (pIrp == NULL) {
341 "Could not allocate irp for WDFREQUEST %p for WDFIOTARGET %p,"
342 " %!STATUS!", GetTraceObjectHandle(), Target->GetHandle(), status);
343 }
344 else {
345 pOldIrp = SetSubmitIrp(pIrp, FALSE);
348 }
349 }
350 else {
351 //
352 // The internal IRP is not owned by this object, so we can't reallocate
353 // it.
354 //
355
356
357
358
359
360
361
363
366 "Cannot reallocate PIRP for WDFREQUEST %p using WDFIOTARGET %p,"
367 " %!STATUS!", GetTraceObjectHandle(), Target->GetHandle(), status);
368 }
369
370 if (pOldIrp != NULL) {
372 "Freeing irp %p from WDFREQUEST %p\n",
373 pOldIrp, GetTraceObjectHandle());
374 FxIrp oldIrp(pOldIrp);
375 oldIrp.FreeIrp();
376 }
377
378 return status;
379}
380
381MdIrp
383 __in_opt MdIrp NewIrp,
384 __in BOOLEAN FreeIrp
385 )
386{
387 MdIrp pOldIrp, pIrpToFree;
388
389 pIrpToFree = NULL;
390 pOldIrp = m_Irp.SetIrp(NewIrp);
391
392 if (NewIrp != NULL) {
394 }
395
396 //
397 // If there is a previous irp that is not the current value and we
398 // allocated it ourselves and the caller wants us to free it, do so.
399 //
400 if (pOldIrp != NULL &&
401 pOldIrp != NewIrp &&
403 if (FreeIrp) {
404 FxIrp oldIrp(pOldIrp);
405 oldIrp.FreeIrp();
406 }
407 else {
408 pIrpToFree = pOldIrp;
409 }
410 }
411
412 return pIrpToFree;
413}
414
415VOID
417 VOID
418 )
419/*++
420
421Routine Description:
422 Invokes the completion routine and uses a completion params that is on the
423 stack. This is in a separate function so that we only consume the stack
424 space if we need to.
425
426Arguments:
427 None
428
429Return Value:
430 None
431
432 --*/
433{
435
437
438 GetSubmitFxIrp()->CopyStatus(&params.IoStatus);
439
440 RtlZeroMemory(&params.Parameters, sizeof(params.Parameters));
441
442
443 //
444 // Once we call the completion routine we can't touch any fields anymore
445 // since the request may be resent down the stack.
446 //
449 &params,
451}
452
453VOID
455 VOID
456 )
457/*++
458
459Routine Description:
460 Routine that handles the setting up of the request packet for being passed
461 back to the completion routine. This includes copying over parameters from
462 the PIRP and any dereferences necessary.
463
464Arguments:
465 None.
466
467Return Value:
468 None.
469
470 --*/
471{
473
475
477
478 if (GetDriverGlobals()->FxVerifierOn) {
479 //
480 // Zero out any values previous driver may have set; when completing the irp
481 // through FxRequest::CompleteInternal, we check to see what the lastest
482 // package was (stored off in the DriverContext). Since the request was
483 // sent off to another devobj, don't assume any valid values in the
484 // DriverContext anymore.
485 //
487
488 //
489 // ClearFormatted also checks for WdfVefiefierOn, but that's OK
490 //
492 }
493
494 if (m_RequestContext != NULL) {
495 //
496 // Always do the copy because the driver can retrieve the parameters
497 // later even if there is no completion routine set.
498 //
501 );
502
504
505 //
506 // Call the completion routine if present. Once we call the completion
507 // routine we can't touch any fields anymore since the request may be resent
508 // down the stack.
509 //
515 }
516 }
518 //
519 // Only put a completion parameters struct on the stack if we have to.
520 // By putting it into a separate function, we can control stack usage
521 // in this way.
522 //
524 }
525
526 //
527 // Release the tag that was acquired when the request was submitted or
528 // pended.
529 //
531}
532
535 VOID
536 )
537/*++
538
539Routine Description:
540 Attempts to cancel a previously submitted or pended request.
541
542Arguments:
543 None
544
545Return Value:
546 TRUE if the request was successfully cancelled, FALSE otherwise
547
548 --*/
549{
551
553 "Request %p", this);
554
555 //
556 // It is critical to set m_Canceled before we check the reference count.
557 // We could be racing with FxIoTarget::SubmitLocked and if this call executes
558 // before SubmitLocked, the completion reference count will still be zero.
559 // SubmitLocked will check m_Canceled after setting the reference count to
560 // one so that it decrement the count back.
561 //
563
564 //
565 // If the ref count is zero, the irp has completed already. This means we
566 // cannot safely touch the underlying PIRP because we cannot guarantee it
567 // will not be completed from underneath us.
568 //
570 //
571 // Successfully incremented the ref count. The PIRP will not be completed
572 // until the count goes to zero.
573 //
574 // Cancelling the irp handles all 2 states:
575 //
576 // 1) the request is pended in a target. the target will attempt to
577 // complete the request immediately in the cancellation routine, but
578 // will not be able to because of the added count to the ref count
579 // done above. The count will move back to zero below and
580 // CompletedCanceledRequest will complete the request
581 //
582 // 2) The irp is in flight to the target WDM device. In which case the
583 // target WDM device should complete the request immediatley. If
584 // it does not, it becomes the same as the case where the target WDM
585 // device has already pended it and placed a cancellation routine
586 // on the request and the request will (a)synchronously complete
587 //
588 result = m_Irp.Cancel();
589
591 "Request %p, PIRP %p, cancel result %d",
592 this, m_Irp.GetIrp(), result);
593
594 //
595 // If the count goes to zero, the completion routine ran, but deferred
596 // completion ownership to this thread since we had the outstanding
597 // refeference.
598 //
600
601 //
602 // Since completion ownership was claimed, m_Target will be valid
603 // until m_Target->CompleteRequest executes because the target will
604 // not delete while there is outstanding I/O.
605 //
606 ASSERT(m_Target != NULL);
607
610 "Request %p, PIRP %p, completed synchronously in cancel call, "
611 "completing request on target %p", this, m_Irp.GetIrp(), m_Target);
612
614 }
615 }
616 else {
618 "Could not cancel request %p, already completed", this);
619
620 result = FALSE;
621 }
622
623 return result;
624}
625
626VOID
628 __in PKDPC Dpc,
632 )
633/*++
634
635Routine Description:
636 DPC for the request timer. It lets the FxIoTarget associated with the
637 request handle the cancellation synchronization with the PIRP's
638 completion routine.
639
640Arguments:
641 Dpc - The DPC itself (part of FxRequestExtension)
642
643 Context - FxRequest* that has timed out
644
645 SystemArgument1 - Ignored
646
647 SystemArgument2 - Ignored
648
649Return Value:
650 None.
651
652 --*/
653{
656
660
661 //
662 // No need to grab FxRequest::Lock b/c if there is a timer running, then the
663 // request is guaranteed to be associated with a target.
664 //
667
668 ASSERT(pTarget != NULL);
670}
671
675 VOID
676 )
677/*++
678
679Routine Description:
680 Late time initialization of timer related structures, we only init
681 timer structures if we are going to use them.
682
683Arguments:
684 None
685
686Assumes:
687 m_Target->Lock() is being held by the caller
688
689Return Value:
690 None
691
692 --*/
693
694{
695 FxRequestTimer* pTimer;
696 PVOID pResult;
698
699 PFX_DRIVER_GLOBALS FxDriverGlobals = GetDriverGlobals();
700
701 if (m_Timer != NULL) {
702 return STATUS_SUCCESS;
703 }
704
705
706
707
708
709 pTimer = new (FxDriverGlobals) FxRequestTimer();
710
711 if(pTimer == NULL) {
713 }
714
715 status = pTimer->Timer.Initialize(this, _TimerDPC, 0);
716 if(!NT_SUCCESS(status)) {
718 "Failed to initialize timer for request %p", this);
719 delete pTimer;
720 return status;
721 }
722
724
725 if (pResult != NULL) {
726 //
727 // Another value was set before we could set it, free our timer now
728 //
729 delete pTimer;
730 }
731
732 return STATUS_SUCCESS;
733}
734
735VOID
738 )
739/*++
740
741Routine Description:
742 Starts a timer for the request
743
744Arguments:
745 Timeout - How long the timeout should be
746
747Assumes:
748 m_Target->Lock() is being held by the caller.
749
750Return Value:
751 None
752
753 --*/
754{
756 timeout.QuadPart = Timeout;
757
759
761
762}
763
767 VOID
768 )
769/*++
770
771Routine Description:
772 Cancel a previously queued timer based on this request if one was set.
773
774Arguments:
775 None
776
777Assumes:
778 Caller is providing synchronization around the call of this function with
779 regard to m_TargetFlags.
780
781Return Value:
782 TRUE if the timer was cancelled successfully or if there was no timer set,
783 otherwise FALSE if the timer was not cancelled and has fired.
784
785 --*/
786{
788 //
789 // If we can successfully cancel the timer, release the reference
790 // taken in StartTimer and mark the timer as not queued.
791 //
792
793 if (m_Timer->Timer.Stop() == FALSE) {
794
796 "Request %p, did not cancel timer", this);
797
798 //
799 // Leave FX_REQUEST_TIMER_SET set. The timer DPC will clear the it
800 //
801
802 return FALSE;
803 }
804
806 "Request %p, canceled timer successfully", this);
807
808 m_TargetFlags &= ~FX_REQUEST_TIMER_SET;
809 }
810
811 return TRUE;
812}
813
815VOID
818 )
819{
821
822 RtlZeroMemory(&data, sizeof(data));
823
824 data.Queue = NULL;
825 data.Request = (WDFREQUEST) GetTraceObjectHandle();
826 data.Status = Status;
827
830 (ULONG_PTR) &data);
831}
832
unsigned char BOOLEAN
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
WDFIOTARGET GetHandle(VOID)
Definition: fxiotarget.hpp:307
VOID CompleteCanceledRequest(__in FxRequestBase *Request)
VOID TimerCallback(__in FxRequestBase *Request)
Definition: fxirp.hpp:28
static _Must_inspect_result_ MdIrp AllocateIrp(_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
Definition: fxirpum.cpp:1089
BOOLEAN Cancel(VOID)
Definition: fxirpum.cpp:475
VOID FreeIrp(VOID)
Definition: fxirpum.cpp:1648
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
MdIrp SetIrp(MdIrp irp)
Definition: fxirpkm.hpp:71
VOID CopyStatus(_Out_ PIO_STATUS_BLOCK StatusBlock)
Definition: fxirpum.cpp:1736
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1101
__inline VOID CallCleanup(VOID)
Definition: fxobject.hpp:815
MdIrp SetSubmitIrp(__in_opt MdIrp NewIrp, __in BOOLEAN FreeIrp=TRUE)
WDFOBJECT_OFFSET_ALIGNED m_OutputBufferOffset
SINGLE_LIST_ENTRY m_DrainSingleEntry
VOID __inline SetPriorityBoost(CCHAR PriorityBoost)
LONG m_IrpCompletionReferenceCount
BOOLEAN m_CanComplete
__inline FxIrp * GetSubmitFxIrp(VOID)
virtual ~FxRequestBase(VOID)
DECLSPEC_NORETURN VOID FatalError(__in NTSTATUS Status)
VOID ClearFieldsForReuse(VOID)
__inline PVOID GetTraceObjectHandle(VOID)
WDFCONTEXT m_TargetCompletionContext
BOOLEAN Cancel(VOID)
FxRequestTimer * m_Timer
FxIoTarget * m_Target
FxIrpQueue * m_IrpQueue
VOID CompleteSubmitted(VOID)
FxRequestBase(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in_opt MdIrp Irp, __in FxRequestIrpOwnership Ownership, __in FxRequestConstructorCaller Caller, __in FxObjectType ObjectType=FxObjectTypeExternal)
UCHAR m_RequestBaseStaticFlags
LIST_ENTRY m_ListEntry
FxRequestContext * m_RequestContext
UCHAR m_RequestBaseFlags
__inline MdIrp GetSubmitIrp(VOID)
_Must_inspect_result_ NTSTATUS CreateTimer(VOID)
__inline VOID VerifierClearFormatted(VOID)
VOID ContextReleaseAndRestore(VOID)
VOID CompleteSubmittedNoContext(VOID)
_Must_inspect_result_ BOOLEAN CancelTimer(VOID)
FxRequestCompletionCallback m_CompletionRoutine
_Must_inspect_result_ NTSTATUS ValidateTarget(__in FxIoTarget *Target)
VOID ZeroOutDriverContext(VOID)
BOOLEAN m_NextStackLocationFormatted
BOOLEAN __inline IsAllocatedFromIo(VOID)
virtual BOOLEAN Dispose(VOID)
__inline VOID SetCompleted(__in BOOLEAN Value)
WDFOBJECT_OFFSET_ALIGNED m_SystemBufferOffset
WDFCONTEXT ClearCompletionContext(VOID)
static MdDeferredRoutineType _TimerDPC
PFN_WDF_REQUEST_COMPLETION_ROUTINE ClearCompletionRoutine(VOID)
VOID StartTimer(__in LONGLONG Timeout)
PFN_WDF_REQUEST_COMPLETION_ROUTINE m_Completion
_Must_inspect_result_ __inline BOOLEAN Stop(VOID)
Definition: mxtimerkm.h:273
__inline VOID Start(__in LARGE_INTEGER DueTime, __in ULONG TolerableDelay=0)
Definition: mxtimerkm.h:251
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in_opt PVOID TimerContext, __in MdDeferredRoutine TimerCallback, __in LONG Period)
Definition: mxtimerkm.h:119
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define TRACINGIOTARGET
Definition: dbgtrace.h:72
#define TRACINGIO
Definition: dbgtrace.h:66
#define TRACINGREQUEST
Definition: dbgtrace.h:65
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
FX_TRACK_DRIVER(fxDriverGlobals)
FxIrp fxIrp(Irp)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
FxRequest * pRequest
__inline LONG FxInterlockedIncrementGTZero(__inout LONG volatile *Target)
Definition: fxglobals.h:1045
#define FX_VF_METHOD(classname, fnName)
Definition: fxmacros.hpp:43
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
Definition: fxmdl.h:60
#define RELEASE(_tag)
Definition: fxobject.hpp:50
FxObjectType
Definition: fxobject.hpp:117
FxIrp * pIrp
FxIrp * irp
@ REQUEST_ALLOCATED_FROM_IO
@ REQUEST_ALLOCATED_DRIVER
@ REQUEST_ALLOCATED_INTERNAL
FxRequestConstructorCaller
@ FxRequestConstructorCallerIsDriver
@ FX_REQUEST_TIMER_SET
@ FXREQUEST_FLAG_SENT_TO_TARGET
@ FxRequestCompletionStateNone
FxRequestIrpOwnership
@ FxRequestOwnsIrp
@ FX_TYPE_REQUEST
Definition: fxtypes.h:53
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
Status
Definition: gdiplustypes.h:25
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define ASSERT(a)
Definition: mode.c:44
ObjectType
Definition: metafile.c:81
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _In_
Definition: ms_sal.h:308
IWudfIrp * MdIrp
Definition: mxum.h:103
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
@ Unlock
Definition: ntsecapi.h:294
#define STATUS_REQUEST_NOT_ACCEPTED
Definition: ntstatus.h:444
short SHORT
Definition: pedump.c:59
unsigned short USHORT
Definition: pedump.c:61
static ULONG Timeout
Definition: ping.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
virtual VOID CopyParameters(__in FxRequestBase *Request)
virtual VOID Dispose(VOID)
Definition: ketypes.h:699
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
Definition: ps.c:97
Definition: dhcpd.h:245
#define GetHandle(h)
Definition: treelist.c:116
int64_t LONGLONG
Definition: typedefs.h:68
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define STATUS_INVALID_DEVICE_STATE
Definition: udferr_usr.h:178
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
@ WDF_QUEUE_FATAL_ERROR
Definition: wdfbugcodes.h:67
@ WdfRequestTypeNoFormat
Definition: wdfdevice.h:533
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1417
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:688
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:689