ReactOS  0.4.15-dev-2703-g05fb0f1
fxrequestbase.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxRequestBase.cpp
8 
9 Abstract:
10 
11  This module implements FxRequestBase object
12 
13 Author:
14 
15 Environment:
16 
17  Both kernel and user mode
18 
19 Revision History:
20 
21 
22 
23 --*/
24 
25 #include "coreprivshared.hpp"
26 
27 // Tracing support
28 extern "C" {
29 // #include "FxRequestBase.tmh"
30 }
31 
33  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
34  __in USHORT ObjectSize,
36  __in FxRequestIrpOwnership Ownership,
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  //
53  if (Caller == FxRequestConstructorCallerIsDriver) {
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 
110  m_Canceled = FALSE;
111 
112  m_PriorityBoost = 0;
113 
115  m_Timer = NULL;
116 
119 
121 
122  m_IrpQueue = NULL;
123 
127 
129 
130  m_VerifierFlags = 0;
131  m_RequestBaseFlags = 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 
182 VOID
183 FX_VF_METHOD(FxRequestBase, VerifyDispose) (
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 
205 BOOLEAN
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 
259 VOID
261  VOID
262  )
263 {
264 #if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
265  if (m_AllocatedMdl != NULL) {
268  }
269 #endif
270 
271  m_RequestBaseFlags = 0;
273  m_VerifierFlags = 0;
274  m_Canceled = FALSE;
275 
277  SetPriorityBoost(0);
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 
298 NTSTATUS
301  )
302 {
303  MdIrp pIrp, pOldIrp;
304  FxIrp fxIrp;
306 
307  pOldIrp = NULL;
308 
309  pIrp = GetSubmitIrp();
310  fxIrp.SetIrp(pIrp);
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 
381 MdIrp
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) {
393  m_Completed = FALSE;
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 
415 VOID
417  VOID
418  )
419 /*++
420 
421 Routine 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 
426 Arguments:
427  None
428 
429 Return 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  //
448  m_Target->GetHandle(),
449  &params,
451 }
452 
453 VOID
455  VOID
456  )
457 /*++
458 
459 Routine 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 
464 Arguments:
465  None.
466 
467 Return Value:
468  None.
469 
470  --*/
471 {
473 
474  pTarget = m_Target;
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  //
512  pTarget->GetHandle(),
515  }
516  }
517  else if (m_CompletionRoutine.m_Completion != NULL) {
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  //
530  RELEASE(pTarget);
531 }
532 
533 BOOLEAN
535  VOID
536  )
537 /*++
538 
539 Routine Description:
540  Attempts to cancel a previously submitted or pended request.
541 
542 Arguments:
543  None
544 
545 Return Value:
546  TRUE if the request was successfully cancelled, FALSE otherwise
547 
548  --*/
549 {
550  BOOLEAN result;
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  //
562  m_Canceled = TRUE;
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 
626 VOID
628  __in PKDPC Dpc,
632  )
633 /*++
634 
635 Routine 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 
640 Arguments:
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 
649 Return 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 
673 NTSTATUS
675  VOID
676  )
677 /*++
678 
679 Routine Description:
680  Late time initialization of timer related structures, we only init
681  timer structures if we are going to use them.
682 
683 Arguments:
684  None
685 
686 Assumes:
687  m_Target->Lock() is being held by the caller
688 
689 Return 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 
723  pResult = InterlockedCompareExchangePointer((PVOID*)&m_Timer, pTimer, NULL);
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 
735 VOID
738  )
739 /*++
740 
741 Routine Description:
742  Starts a timer for the request
743 
744 Arguments:
745  Timeout - How long the timeout should be
746 
747 Assumes:
748  m_Target->Lock() is being held by the caller.
749 
750 Return Value:
751  None
752 
753  --*/
754 {
756  timeout.QuadPart = Timeout;
757 
759 
761 
762 }
763 
765 BOOLEAN
767  VOID
768  )
769 /*++
770 
771 Routine Description:
772  Cancel a previously queued timer based on this request if one was set.
773 
774 Arguments:
775  None
776 
777 Assumes:
778  Caller is providing synchronization around the call of this function with
779  regard to m_TargetFlags.
780 
781 Return 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 
809  }
810 
811  return TRUE;
812 }
813 
815 VOID
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 
_Must_inspect_result_ NTSTATUS CreateTimer(VOID)
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
FxRequestIrpOwnership
ObjectType
Definition: metafile.c:80
#define GetHandle(h)
Definition: treelist.c:116
BOOLEAN Cancel(VOID)
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in_opt PVOID TimerContext, __in MdDeferredRoutine TimerCallback, __in LONG Period)
Definition: mxtimerkm.h:119
#define _Must_inspect_result_
Definition: no_sal2.h:62
virtual BOOLEAN Dispose(VOID)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
VOID ClearFieldsForReuse(VOID)
GLuint64EXT * result
Definition: glext.h:11304
FxIoTarget * m_Target
#define __in_opt
Definition: dbghelp.h:38
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ BOOLEAN CancelTimer(VOID)
FxRequest * pRequest
__inline FxIrp * GetSubmitFxIrp(VOID)
Definition: fxirp.hpp:28
#define STATUS_REQUEST_NOT_ACCEPTED
Definition: ntstatus.h:444
UCHAR m_RequestBaseStaticFlags
BOOLEAN __inline IsAllocatedFromIo(VOID)
KIRQL irql
Definition: wave.h:1
Definition: dhcpd.h:245
FxIrp * pIrp
#define RELEASE(_tag)
Definition: fxobject.hpp:50
FxRequestTimer * m_Timer
#define TRACINGREQUEST
Definition: dbgtrace.h:65
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
GLbitfield GLuint64 timeout
Definition: glext.h:7164
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
LIST_ENTRY m_ListEntry
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define STATUS_INVALID_DEVICE_STATE
Definition: udferr_usr.h:178
LONG m_IrpCompletionReferenceCount
WDFIOTARGET GetHandle(VOID)
Definition: fxiotarget.hpp:307
UCHAR KIRQL
Definition: env_spec_w32.h:591
FxObjectType
Definition: fxobject.hpp:117
VOID StartTimer(__in LONGLONG Timeout)
#define FALSE
Definition: types.h:117
GLenum const GLfloat * params
Definition: glext.h:5645
_In_ PIRP Irp
Definition: csq.h:116
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
WDFOBJECT_OFFSET_ALIGNED m_OutputBufferOffset
short SHORT
Definition: pedump.c:59
VOID CompleteSubmittedNoContext(VOID)
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1101
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
unsigned char BOOLEAN
__inline PVOID GetTraceObjectHandle(VOID)
IWudfIrp * MdIrp
Definition: mxum.h:103
VOID __inline SetPriorityBoost(CCHAR PriorityBoost)
__inline VOID Start(__in LARGE_INTEGER DueTime, __in ULONG TolerableDelay=0)
Definition: mxtimerkm.h:251
Status
Definition: gdiplustypes.h:24
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
int64_t LONGLONG
Definition: typedefs.h:68
VOID CopyStatus(_Out_ PIO_STATUS_BLOCK StatusBlock)
Definition: fxirpum.cpp:1736
WDFCONTEXT m_TargetCompletionContext
__inline MdIrp GetSubmitIrp(VOID)
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
__inline VOID VerifierClearFormatted(VOID)
MdIrp SetSubmitIrp(__in_opt MdIrp NewIrp, __in BOOLEAN FreeIrp=TRUE)
PFN_WDF_REQUEST_COMPLETION_ROUTINE ClearCompletionRoutine(VOID)
VOID TimerCallback(__in FxRequestBase *Request)
VOID CompleteSubmitted(VOID)
VOID FreeIrp(VOID)
Definition: fxirpum.cpp:1648
VOID CompleteCanceledRequest(__in FxRequestBase *Request)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
FxIrpQueue * m_IrpQueue
GLbitfield flags
Definition: glext.h:7161
virtual VOID Dispose(VOID)
virtual VOID CopyParameters(__in FxRequestBase *Request)
FxRequestConstructorCaller
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
#define InterlockedDecrement
Definition: armddk.h:52
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
Definition: fxmdl.h:60
Definition: ketypes.h:687
virtual ~FxRequestBase(VOID)
static MdDeferredRoutineType _TimerDPC
WDFOBJECT_OFFSET_ALIGNED m_SystemBufferOffset
VOID ZeroOutDriverContext(VOID)
static _Must_inspect_result_ MdIrp AllocateIrp(_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
Definition: fxirpum.cpp:1089
__inline VOID SetCompleted(__in BOOLEAN Value)
_Must_inspect_result_ NTSTATUS ValidateTarget(__in FxIoTarget *Target)
UCHAR m_RequestBaseFlags
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
#define _In_
Definition: no_sal2.h:158
VOID FX_VF_METHOD(FxRequestBase, VerifyDispose)(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals)
WDFCONTEXT ClearCompletionContext(VOID)
FxRequestBase(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in_opt MdIrp Irp, __in FxRequestIrpOwnership Ownership, __in FxRequestConstructorCaller Caller, __in FxObjectType ObjectType=FxObjectTypeExternal)
FxRequestCompletionCallback m_CompletionRoutine
static ULONG Timeout
Definition: ping.c:61
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
__inline LONG FxInterlockedIncrementGTZero(__inout LONG volatile *Target)
Definition: fxglobals.h:1045
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
SINGLE_LIST_ENTRY m_DrainSingleEntry
unsigned short USHORT
Definition: pedump.c:61
PFN_WDF_REQUEST_COMPLETION_ROUTINE m_Completion
__inline VOID CallCleanup(VOID)
Definition: fxobject.hpp:815
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxIrp fxIrp(Irp)
#define NULL
Definition: types.h:112
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
VOID ContextReleaseAndRestore(VOID)
DECLSPEC_NORETURN VOID FatalError(__in NTSTATUS Status)
FxRequestContext * m_RequestContext
BOOLEAN Cancel(VOID)
Definition: fxirpum.cpp:475
FX_TRACK_DRIVER(fxDriverGlobals)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACINGIO
Definition: dbgtrace.h:66
MdIrp SetIrp(MdIrp irp)
Definition: fxirpkm.hpp:71
#define __in
Definition: dbghelp.h:35
static SERVICE_STATUS status
Definition: service.c:31
#define TRACINGIOTARGET
Definition: dbgtrace.h:72
BOOLEAN m_NextStackLocationFormatted
FxIrp * irp
__inline WDFREQUEST GetHandle(VOID)
BOOLEAN m_CanComplete
FxVerifierDbgBreakPoint(pFxDriverGlobals)
_Must_inspect_result_ __inline BOOLEAN Stop(VOID)
Definition: mxtimerkm.h:273
Definition: ps.c:97