ReactOS  0.4.15-dev-3326-ga91f5e8
FxIrp Class Reference

#include <fxirp.hpp>

Inheritance diagram for FxIrp:

Public Member Functions

 FxIrp ()
 
 FxIrp (MdIrp irp)
 
MdIrp SetIrp (MdIrp irp)
 
MdIrp GetIrp (VOID)
 
VOID CompleteRequest (__in_opt CCHAR PriorityBoost=IO_NO_INCREMENT)
 
NTSTATUS CallDriver (__in MdDeviceObject DeviceObject)
 
NTSTATUS PoCallDriver (__in MdDeviceObject DeviceObject)
 
VOID StartNextPowerIrp ()
 
MdCompletionRoutine GetNextCompletionRoutine (VOID)
 
VOID SetCompletionRoutine (__in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
 
VOID SetCompletionRoutineEx (__in MdDeviceObject DeviceObject, __in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
 
MdCancelRoutine SetCancelRoutine (__in_opt MdCancelRoutine CancelRoutine)
 
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously (__in MdDeviceObject DeviceObject)
 
VOID CopyCurrentIrpStackLocationToNext (VOID)
 
VOID CopyToNextIrpStackLocation (__in PIO_STACK_LOCATION Stack)
 
VOID SetNextIrpStackLocation (VOID)
 
UCHAR GetMajorFunction (VOID)
 
UCHAR GetMinorFunction (VOID)
 
UCHAR GetCurrentStackFlags (VOID)
 
MdFileObject GetCurrentStackFileObject (VOID)
 
KPROCESSOR_MODE GetRequestorMode (VOID)
 
VOID SetContext (__in ULONG Index, __in PVOID Value)
 
VOID SetSystemBuffer (__in PVOID Value)
 
VOID SetUserBuffer (__in PVOID Value)
 
VOID SetMdlAddress (__in PMDL Value)
 
VOID SetFlags (__in ULONG Flags)
 
PVOID GetContext (__in ULONG Index)
 
ULONG GetFlags (VOID)
 
PIO_STACK_LOCATION GetCurrentIrpStackLocation (VOID)
 
PIO_STACK_LOCATION GetNextIrpStackLocation (VOID)
 
VOID SkipCurrentIrpStackLocation (VOID)
 
VOID MarkIrpPending ()
 
BOOLEAN PendingReturned ()
 
VOID PropagatePendingReturned (VOID)
 
VOID SetStatus (__in NTSTATUS Status)
 
NTSTATUS GetStatus ()
 
BOOLEAN Cancel (VOID)
 
VOID SetCancel (__in BOOLEAN Cancel)
 
BOOLEAN IsCanceled ()
 
KIRQL GetCancelIrql ()
 
VOID SetInformation (__in ULONG_PTR Information)
 
ULONG_PTR GetInformation ()
 
CCHAR GetCurrentIrpStackLocationIndex ()
 
CCHAR GetStackCount ()
 
PLIST_ENTRY ListEntry ()
 
PVOID GetSystemBuffer ()
 
PVOID GetOutputBuffer ()
 
PMDL GetMdl ()
 
PMDLGetMdlAddressPointer ()
 
PVOID GetUserBuffer ()
 
VOID Reuse (__in NTSTATUS Status=STATUS_SUCCESS)
 
VOID SetMajorFunction (__in UCHAR MajorFunction)
 
VOID SetMinorFunction (__in UCHAR MinorFunction)
 
SYSTEM_POWER_STATE_CONTEXT GetParameterPowerSystemPowerStateContext ()
 
POWER_STATE_TYPE GetParameterPowerType ()
 
POWER_STATE GetParameterPowerState ()
 
DEVICE_POWER_STATE GetParameterPowerStateDeviceState ()
 
SYSTEM_POWER_STATE GetParameterPowerStateSystemState ()
 
POWER_ACTION GetParameterPowerShutdownType ()
 
MdFileObject GetFileObject (VOID)
 
DEVICE_RELATION_TYPE GetParameterQDRType ()
 
VOID SetParameterQDRType (__in DEVICE_RELATION_TYPE DeviceRelation)
 
PDEVICE_CAPABILITIES GetParameterDeviceCapabilities ()
 
VOID SetCurrentDeviceObject (__in MdDeviceObject DeviceObject)
 
MdDeviceObject GetDeviceObject (VOID)
 
VOID SetParameterDeviceCapabilities (__in PDEVICE_CAPABILITIES DeviceCapabilities)
 
LONGLONG GetParameterWriteByteOffsetQuadPart ()
 
VOID SetNextParameterWriteByteOffsetQuadPart (__in LONGLONG DeviceOffset)
 
ULONG GetCurrentParameterWriteLength ()
 
VOID SetNextParameterWriteLength (__in ULONG IoLength)
 
PVOIDGetNextStackParameterOthersArgument1Pointer ()
 
VOID SetNextStackParameterOthersArgument1 (__in PVOID Argument1)
 
PVOIDGetNextStackParameterOthersArgument2Pointer ()
 
PVOIDGetNextStackParameterOthersArgument4Pointer ()
 
PCM_RESOURCE_LIST GetParameterAllocatedResources ()
 
VOID SetParameterAllocatedResources (__in PCM_RESOURCE_LIST AllocatedResources)
 
PCM_RESOURCE_LIST GetParameterAllocatedResourcesTranslated ()
 
VOID SetParameterAllocatedResourcesTranslated (__in PCM_RESOURCE_LIST AllocatedResourcesTranslated)
 
LCID GetParameterQueryDeviceTextLocaleId ()
 
DEVICE_TEXT_TYPE GetParameterQueryDeviceTextType ()
 
BOOLEAN GetParameterSetLockLock ()
 
BUS_QUERY_ID_TYPE GetParameterQueryIdType ()
 
PINTERFACE GetParameterQueryInterfaceInterface ()
 
const GUIDGetParameterQueryInterfaceType ()
 
USHORT GetParameterQueryInterfaceVersion ()
 
USHORT GetParameterQueryInterfaceSize ()
 
PVOID GetParameterQueryInterfaceInterfaceSpecificData ()
 
VOID SetParameterQueryInterfaceInterface (__in PINTERFACE Interface)
 
VOID SetParameterQueryInterfaceType (__in const GUID *InterfaceType)
 
VOID SetParameterQueryInterfaceVersion (__in USHORT Version)
 
VOID SetParameterQueryInterfaceSize (__in USHORT Size)
 
VOID SetParameterQueryInterfaceInterfaceSpecificData (__in PVOID InterfaceSpecificData)
 
DEVICE_USAGE_NOTIFICATION_TYPE GetParameterUsageNotificationType ()
 
BOOLEAN GetParameterUsageNotificationInPath ()
 
VOID SetParameterUsageNotificationInPath (__in BOOLEAN InPath)
 
BOOLEAN GetNextStackParameterUsageNotificationInPath ()
 
ULONG GetParameterIoctlCode (VOID)
 
ULONG GetParameterIoctlCodeBufferMethod (VOID)
 
ULONG GetParameterIoctlInputBufferLength (VOID)
 
ULONG GetParameterIoctlOutputBufferLength (VOID)
 
PVOID GetParameterIoctlType3InputBuffer (VOID)
 
VOID SetParameterIoctlCode (__in ULONG DeviceIoControlCode)
 
VOID SetParameterIoctlInputBufferLength (__in ULONG InputBufferLength)
 
VOID SetParameterIoctlOutputBufferLength (__in ULONG OutputBufferLength)
 
VOID SetParameterIoctlType3InputBuffer (__in PVOID Type3InputBuffer)
 
ULONG GetParameterReadLength (VOID)
 
ULONG GetParameterWriteLength (VOID)
 
VOID SetNextStackFlags (__in UCHAR Flags)
 
VOID SetNextStackFileObject (_In_ MdFileObject FileObject)
 
PVOID GetCurrentParametersPointer (VOID)
 
VOID ClearNextStack (VOID)
 
VOID ClearNextStackLocation (VOID)
 
VOID InitNextStackUsingStack (__in FxIrp *Irp)
 
ULONG GetCurrentFlags (VOID)
 
VOID FreeIrp (VOID)
 
MdEThread GetThread (VOID)
 
BOOLEAN Is32bitProcess (VOID)
 
PIO_STATUS_BLOCK GetStatusBlock (VOID)
 
PVOID GetDriverContext ()
 
ULONG GetDriverContextSize ()
 
VOID CopyParameters (_Out_ PWDF_REQUEST_PARAMETERS Parameters)
 
VOID CopyStatus (_Out_ PIO_STATUS_BLOCK StatusBlock)
 
BOOLEAN HasStack (_In_ UCHAR StackCount)
 
BOOLEAN IsCurrentIrpStackLocationValid (VOID)
 
IWudfIoIrp * GetIoIrp (VOID)
 
IWudfPnpIrp * GetPnpIrp (VOID)
 

Static Public Member Functions

static PIO_STACK_LOCATION _GetAndClearNextStackLocation (__in MdIrp Irp)
 
static _Must_inspect_result_ MdIrp AllocateIrp (_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
 
static MdIrp GetIrpFromListEntry (__in PLIST_ENTRY Ple)
 
static _Must_inspect_result_ NTSTATUS RequestPowerIrp (__in MdDeviceObject DeviceObject, __in UCHAR MinorFunction, __in POWER_STATE PowerState, __in MdRequestPowerComplete CompletionFunction, __in PVOID Context)
 

Static Private Member Functions

static NTSTATUS STDCALL _IrpSynchronousCompletion (__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp, __in PVOID Context)
 

Private Attributes

MdIrp m_Irp
 

Friends

struct FxAutoIrp
 

Detailed Description

Definition at line 28 of file fxirp.hpp.

Constructor & Destructor Documentation

◆ FxIrp() [1/2]

FxIrp::FxIrp ( )
inline

Definition at line 37 of file fxirp.hpp.

37 {}

◆ FxIrp() [2/2]

FxIrp::FxIrp ( MdIrp  irp)
inline

Definition at line 39 of file fxirp.hpp.

39  : m_Irp(irp)
40  {
41  }
MdIrp m_Irp
Definition: fxirp.hpp:33
FxIrp * irp

Member Function Documentation

◆ _GetAndClearNextStackLocation()

PIO_STACK_LOCATION __inline FxIrp::_GetAndClearNextStackLocation ( __in MdIrp  Irp)
static

Definition at line 371 of file fxirpkm.hpp.

374 {
378 }
_In_ PIRP Irp
Definition: csq.h:116
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:893
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

◆ _IrpSynchronousCompletion()

__inline NTSTATUS STDCALL FxIrp::_IrpSynchronousCompletion ( __in MdDeviceObject  DeviceObject,
__in MdIrp  OriginalIrp,
__in PVOID  Context 
)
staticprivate

Definition at line 133 of file fxirpum.cpp.

138 {
139  HANDLE event = (HANDLE) Context;
140 
142 
143  SetEvent(event);
144 
146 }
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: shellext.h:68
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
PVOID HANDLE
Definition: typedefs.h:73
struct _cl_event * event
Definition: glext.h:7739

Referenced by SendIrpSynchronously().

◆ AllocateIrp()

_Must_inspect_result_ __inline MdIrp FxIrp::AllocateIrp ( _In_ CCHAR  StackSize,
_In_opt_ FxDevice Device = NULL 
)
static

Definition at line 1089 of file fxirpum.cpp.

1093 {
1094  IWudfIoIrp* ioIrp;
1095  HRESULT hr;
1096  NTSTATUS status;
1097 
1098  ioIrp = NULL;
1099 
1100  FX_VERIFY(INTERNAL, CHECK_NOT_NULL(Device));
1101 
1102  //
1103  // UMDF currently support allocating of I/O Irps only
1104  //
1105  hr = Device->GetDeviceStack()->AllocateIoIrp(Device->GetDeviceObject(),
1106  StackSize,
1107  &ioIrp);
1108 
1109  if (FAILED(hr)) {
1110  status = Device->NtStatusFromHr(hr);
1112  Device->GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGIO,
1113  "WDFDEVICE 0x%p Failed to allocate I/O request %!STATUS!",
1114  Device->GetHandle(), status);
1115 
1116  FX_VERIFY_WITH_NAME(INTERNAL, CHECK_NULL(ioIrp),
1117  Device->GetDriverGlobals()->Public.DriverName);
1118  }
1119  else {
1120  FX_VERIFY_WITH_NAME(INTERNAL, CHECK_NOT_NULL(ioIrp),
1121  Device->GetDriverGlobals()->Public.DriverName);
1122  }
1123 
1124  return ioIrp;
1125 }
HRESULT hr
Definition: shlfolder.c:183
LONG NTSTATUS
Definition: precomp.h:26
FX_VERIFY_WITH_NAME(DRIVER(BadArgument, TODO), CHECK(ERROR_STRING_HW_ACCESS_NOT_ALLOWED,(pDevice->IsDirectHardwareAccessAllowed()==TRUE)), DriverGlobals->DriverName)
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
_In_ USHORT _In_ CCHAR StackSize
Definition: iofuncs.h:1058
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
#define TRACINGIO
Definition: dbgtrace.h:66
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by GetStackCapabilities(), FxUsbIdleInfo::Initialize(), FxPkgPnp::PnpDeviceUsageNotification(), PnpPassThroughQI(), FxPkgPnp::QueryForD3ColdInterface(), and FxRequestBase::ValidateTarget().

◆ CallDriver()

__inline NTSTATUS FxIrp::CallDriver ( __in MdDeviceObject  DeviceObject)

◆ Cancel()

__inline BOOLEAN FxIrp::Cancel ( VOID  )

Definition at line 475 of file fxirpum.cpp.

478 {
479  return (m_Irp->Cancel() ? TRUE: FALSE);
480 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117

Referenced by FxRequestBase::Cancel(), FxPkgPnp::PowerPolicyCancelUsbSS(), FxPkgPnp::PowerPolicyCancelWaitWake(), and SetCancel().

◆ ClearNextStack()

__inline VOID FxIrp::ClearNextStack ( VOID  )

Definition at line 1183 of file fxirpum.cpp.

1185 {
1186  m_Irp->ClearNextStackLocation();
1187 }
MdIrp m_Irp
Definition: fxirp.hpp:33

Referenced by GetStackCapabilities(), and FxPkgPnp::QueryForD3ColdInterface().

◆ ClearNextStackLocation()

__inline VOID FxIrp::ClearNextStackLocation ( VOID  )

Definition at line 1581 of file fxirpum.cpp.

1584 {
1585  m_Irp->ClearNextStackLocation();
1586 }
MdIrp m_Irp
Definition: fxirp.hpp:33

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest(), FxIoTarget::FormatIoctlRequest(), FxIoTarget::FormatIoRequest(), and FxFormatUsbRequest().

◆ CompleteRequest()

◆ CopyCurrentIrpStackLocationToNext()

__inline VOID FxIrp::CopyCurrentIrpStackLocationToNext ( VOID  )

◆ CopyParameters()

__inline VOID FxIrp::CopyParameters ( _Out_ PWDF_REQUEST_PARAMETERS  Parameters)

Definition at line 1691 of file fxirpum.cpp.

1694 {
1695  IWudfIoIrp* ioIrp;
1697 
1698  ioIrp = GetIoIrp();
1700 
1701  switch (majorFunction) {
1702  case IRP_MJ_CREATE:
1703  ioIrp->GetCreateParameters(
1704  &Parameters->Parameters.Create.Options,
1705  &Parameters->Parameters.Create.FileAttributes,
1706  &Parameters->Parameters.Create.ShareAccess,
1707  NULL // ACCESS_MASK*
1708  );
1709  break;
1710  case IRP_MJ_READ:
1711  ioIrp->GetReadParameters((ULONG*)&Parameters->Parameters.Read.Length,
1712  &Parameters->Parameters.Read.DeviceOffset,
1713  &Parameters->Parameters.Read.Key);
1714  break;
1715  case IRP_MJ_WRITE:
1716  ioIrp->GetWriteParameters((ULONG*)&Parameters->Parameters.Write.Length,
1717  &Parameters->Parameters.Write.DeviceOffset,
1718  &Parameters->Parameters.Write.Key);
1719  break;
1720  case IRP_MJ_DEVICE_CONTROL:
1721  ioIrp->GetDeviceIoControlParameters(
1722  &Parameters->Parameters.DeviceIoControl.IoControlCode,
1723  (ULONG*)&Parameters->Parameters.DeviceIoControl.InputBufferLength,
1724  (ULONG*)&Parameters->Parameters.DeviceIoControl.OutputBufferLength
1725  );
1726  break;
1727  default:
1728  FX_VERIFY(INTERNAL, TRAPMSG("Not expected"));
1729  break;
1730  }
1731 
1732  return;
1733 }
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
unsigned char UCHAR
Definition: xmlstorage.h:181
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
UCHAR majorFunction
#define IRP_MJ_READ
Definition: rdpdr.c:46
unsigned int ULONG
Definition: retypes.h:1
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxRequest::GetParameters().

◆ CopyStatus()

__inline VOID FxIrp::CopyStatus ( _Out_ PIO_STATUS_BLOCK  StatusBlock)

Definition at line 1736 of file fxirpum.cpp.

1739 {
1740  StatusBlock->Status = GetStatus();
1741  StatusBlock->Information = GetInformation();
1742 }
ULONG_PTR GetInformation()
Definition: fxirpum.cpp:513
NTSTATUS GetStatus()
Definition: fxirpum.cpp:466

Referenced by FxRequestBase::CompleteSubmitted(), and FxRequestBase::CompleteSubmittedNoContext().

◆ CopyToNextIrpStackLocation()

__inline VOID FxIrp::CopyToNextIrpStackLocation ( __in PIO_STACK_LOCATION  Stack)

Definition at line 1216 of file fxirpum.cpp.

1219 {
1221 
1222 
1223 
1224 
1225 
1226 
1227 
1228 
1229 
1230  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1231 
1232 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:636
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ FreeIrp()

__inline VOID FxIrp::FreeIrp ( VOID  )

Definition at line 1648 of file fxirpum.cpp.

1651 {
1652  //
1653  // Release the um com irp creation ref
1654  //
1655  m_Irp->Release();
1656 
1657  //
1658  // This is equivalent to IoFreeIrp in km.
1659  //
1660  GetIoIrp()->Deallocate();
1661 }
MdIrp m_Irp
Definition: fxirp.hpp:33
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777

Referenced by FxRequest::Reuse(), FxRequestBase::SetSubmitIrp(), FxRequestBase::ValidateTarget(), and FxRequestBase::~FxRequestBase().

◆ GetCancelIrql()

__inline KIRQL FxIrp::GetCancelIrql ( )

Definition at line 492 of file fxirpum.cpp.

494 {
495  //
496  // CancelIrql is used to pass in to IoReleaseCancelSpinLock
497  // hence it is not applicable to UMDF.
498  //
499  return PASSIVE_LEVEL;
500 }
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693

◆ GetContext()

__inline PVOID FxIrp::GetContext ( __in ULONG  Index)

Definition at line 361 of file fxirpum.cpp.

364 {
365  return m_Irp->GetContext(Index);
366 }
MdIrp m_Irp
Definition: fxirp.hpp:33
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by FxPkgPdo::_QueryCapsWorkItem(), FxIrpQueue::IsIrpInQueue(), FxIrpQueue::PeekRequest(), FxIrpQueue::RemoveIrpFromQueueByContext(), and FxIrpQueue::RemoveNextIrpFromQueue().

◆ GetCurrentFlags()

__inline ULONG FxIrp::GetCurrentFlags ( VOID  )

Definition at line 1613 of file fxirpum.cpp.

1616 {
1617  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1618  return 0;
1619 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetCurrentIrpStackLocation()

__inline PIO_STACK_LOCATION FxIrp::GetCurrentIrpStackLocation ( VOID  )

Definition at line 370 of file fxirpum.cpp.

373 {
374 
375 
376 
377 
378  // The Km implementation does some verifier checks in this function so
379  // mode agnostic code uses it and therefore we provide the um version as a
380  // stub. The return value is NULL and is not used by the caller.
381  //
382  return NULL;
383 }
#define NULL
Definition: types.h:112

Referenced by FxIoQueue::DispatchRequestToDriver(), and FxRequest::GetCurrentIrpStackLocation().

◆ GetCurrentIrpStackLocationIndex()

__inline CCHAR FxIrp::GetCurrentIrpStackLocationIndex ( )

Definition at line 521 of file fxirpum.cpp.

523 {
524 
525 
526 
527 
528  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
529 
530  return -1;
531 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by if(), and VerifyWdfRequestForwardToParentDeviceIoQueue().

◆ GetCurrentParametersPointer()

__inline PVOID FxIrp::GetCurrentParametersPointer ( VOID  )

Definition at line 1622 of file fxirpum.cpp.

1625 {
1626  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1627  return NULL;
1628 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetCurrentParameterWriteLength()

ULONG FxIrp::GetCurrentParameterWriteLength ( )

◆ GetCurrentStackFileObject()

__inline MdFileObject FxIrp::GetCurrentStackFileObject ( VOID  )

Definition at line 1258 of file fxirpum.cpp.

1261 {
1262  return GetIoIrp()->GetFile();
1263 }
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777

Referenced by FxIoTarget::CopyFileObjectAndFlags().

◆ GetCurrentStackFlags()

__inline UCHAR FxIrp::GetCurrentStackFlags ( VOID  )

Definition at line 1243 of file fxirpum.cpp.

1246 {
1247 
1248 
1249 
1250 
1251 
1252 
1253 
1254  return 0;
1255 }

Referenced by FxIoTarget::CopyFileObjectAndFlags().

◆ GetDeviceObject()

__inline MdDeviceObject FxIrp::GetDeviceObject ( VOID  )

Definition at line 1352 of file fxirpum.cpp.

1355 {
1356 
1357  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1358  return NULL;
1359 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxIoQueue::ForwardRequestToParent(), FxRequestSystemBuffer::GetBuffer(), and FxRequestSystemBuffer::GetMdl().

◆ GetDriverContext()

__inline PVOID FxIrp::GetDriverContext ( )

Definition at line 1673 of file fxirpum.cpp.

1676 {
1677  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1678  return NULL;
1679 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetDriverContextSize()

__inline ULONG FxIrp::GetDriverContextSize ( )

Definition at line 1682 of file fxirpum.cpp.

1685 {
1686  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1687  return 0;
1688 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetFileObject()

__inline MdFileObject FxIrp::GetFileObject ( VOID  )

Definition at line 1460 of file fxirpum.cpp.

1463 {
1464  IWudfIoIrp * pIoIrp = NULL;
1465 
1466  HRESULT hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
1467  FX_VERIFY(INTERNAL, CHECK_QI(hrQI, pIoIrp));
1468  pIoIrp->Release();
1469 
1470  return pIoIrp->GetFile();
1471 }
MdIrp m_Irp
Definition: fxirp.hpp:33
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
#define NULL
Definition: types.h:112

Referenced by FxRequest::GetFileObject(), FxPkgGeneral::OnCleanup(), FxPkgGeneral::OnClose(), FxPkgGeneral::OnCreate(), FxIrpQueue::PeekNextIrpFromQueue(), and FxIrpQueue::PeekRequest().

◆ GetFlags()

__inline ULONG FxIrp::GetFlags ( VOID  )

Definition at line 1281 of file fxirpum.cpp.

1284 {
1285 
1286 
1287 
1288 
1289 
1290  return 0;
1291 }

Referenced by FxRequest::CompleteInternal().

◆ GetInformation()

◆ GetIoIrp()

IWudfIoIrp * FxIrp::GetIoIrp ( VOID  )

Definition at line 1777 of file fxirpum.cpp.

1780 {
1781  IWudfIoIrp* pIoIrp;
1782  HRESULT hrQI;
1783 
1784  hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
1785  FX_VERIFY(INTERNAL, CHECK_QI(hrQI, pIoIrp));
1786  pIoIrp->Release();
1787 
1788  //
1789  // Now that we confirmed the irp is an io irp, just return the underlying
1790  // irp.
1791  //
1792  return static_cast<IWudfIoIrp*>(m_Irp);
1793 }
MdIrp m_Irp
Definition: fxirp.hpp:33
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()

Referenced by CopyParameters(), FreeIrp(), GetCurrentStackFileObject(), GetOutputBuffer(), GetParameterIoctlCode(), GetParameterIoctlInputBufferLength(), GetParameterIoctlOutputBufferLength(), GetParameterReadLength(), GetParameterWriteLength(), GetSystemBuffer(), GetUserBuffer(), Is32bitProcess(), Reuse(), FxRequest::SetImpersonationFlags(), SetNextStackFileObject(), and FxIoContext::SwapIrpBuffer().

◆ GetIrp()

◆ GetIrpFromListEntry()

__inline MdIrp FxIrp::GetIrpFromListEntry ( __in PLIST_ENTRY  Ple)
static

Definition at line 1190 of file fxirpum.cpp.

1193 {
1194  return g_IWudfHost2->GetIrpFromListEntry(ListEntry);
1195 }
PLIST_ENTRY ListEntry()
Definition: fxirpum.cpp:535
IWudfHost2 * g_IWudfHost2
Definition: framework.cpp:48

Referenced by FxIoQueue::CancelIrps(), FxIrpQueue::IsIrpInQueue(), FxIrpQueue::PeekNextIrpFromQueue(), FxIrpQueue::PeekRequest(), and FxPkgPnp::PowerCompletePendedWakeIrp().

◆ GetMajorFunction()

__inline UCHAR FxIrp::GetMajorFunction ( VOID  )

Definition at line 217 of file fxirpum.cpp.

220 {
222  IWudfIoIrp * pIoIrp = NULL;
223  IWudfPnpIrp * pPnpIrp = NULL;
224 
225  //
226  // IWudfIrp does not expose a method to get major function code. So we
227  // find out if it's an I/O irp or pnp irp. If I/O irp then we use GetType
228  // method to retrieve request tyoe and then map it to major function code,
229  // otherwise if it is pnp irp then we just use GetMajorFunction method
230  // exposed by IWudfPnpIrp.
231  //
232  HRESULT hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
233  if (SUCCEEDED(hrQI)) {
235 
236  //
237  // for Io irp, map request type to major funcction
238  //
239  type = (UMINT::WDF_REQUEST_TYPE) pIoIrp->GetType();
240  switch(type) {
241  case UMINT::WdfRequestCreate:
243  break;
244  case UMINT::WdfRequestCleanup:
246  break;
247  case UMINT::WdfRequestRead:
249  break;
250  case UMINT::WdfRequestWrite:
252  break;
253  case UMINT::WdfRequestDeviceIoControl:
255  break;
256  case UMINT::WdfRequestClose:
258  break;
259  case UMINT::WdfRequestInternalIoctl:
261  break;
262  case UMINT::WdfRequestFlushBuffers:
264  break;
265  case UMINT::WdfRequestQueryInformation:
267  break;
268  case UMINT::WdfRequestSetInformation:
270  break;
271  case UMINT::WdfRequestUsb:
272  case UMINT::WdfRequestOther:
273  // fall through
274  default:
275  FX_VERIFY(INTERNAL, TRAPMSG("The request type is not expected"));
276  }
277 
278  pIoIrp->Release();
279  }
280  else {
281  FX_VERIFY(INTERNAL, CHECK_NULL(pIoIrp));
282 
283  //
284  // see if it is a pnp irp
285  //
286  hrQI = m_Irp->QueryInterface(IID_IWudfPnpIrp, (PVOID*)&pPnpIrp);
287  FX_VERIFY(INTERNAL, CHECK_QI(hrQI, pPnpIrp));
288 
289  majorFunction = pPnpIrp->GetMajorFunction();
290  pPnpIrp->Release();
291  }
292 
293  return majorFunction;
294 }
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
MdIrp m_Irp
Definition: fxirp.hpp:33
#define IRP_MJ_FLUSH_BUFFERS
#define IRP_MJ_MAXIMUM_FUNCTION
if SUCCEEDED(hr)
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
enum _WDF_REQUEST_TYPE WDF_REQUEST_TYPE
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
unsigned char UCHAR
Definition: xmlstorage.h:181
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define NULL
Definition: types.h:112
UCHAR majorFunction
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CLEANUP
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxRequest::AssignMemoryBuffers(), FxRequest::CompleteInternal(), CopyParameters(), FxDefaultIrpHandler::Dispatch(), FxPkgIo::Dispatch(), FxPkgGeneral::Dispatch(), FxPkgPnp::Dispatch(), FxDevice::DispatchPreprocessedIrp(), FxIoQueue::DispatchRequestToDriver(), FxPkgIo::DispatchStep1(), FxPkgIo::DispatchStep2(), FxDevice::DispatchWithLock(), DispatchWorker(), FxRequestSystemBuffer::GetBuffer(), FxRequestOutputBuffer::GetBuffer(), FxRequestSystemBuffer::GetBufferSize(), FxRequestOutputBuffer::GetBufferSize(), FxRequest::GetDeviceControlOutputMdl(), FxRequest::GetDeviceControlOutputMemoryObject(), FxRequestSystemBuffer::GetFlags(), FxRequestOutputBuffer::GetFlags(), FxRequestSystemBuffer::GetMdl(), FxRequestOutputBuffer::GetMdl(), FxRequest::GetMdl(), FxRequest::GetMemoryObject(), GetOutputBuffer(), GetParameterIoctlCode(), FxRequest::GetParameters(), FxIoQueue::GetRequest(), GetSystemBuffer(), IsPreprocessIrp(), PerfIoComplete(), PerfIoStart(), PreprocessIrp(), FxIoTargetSelf::Send(), and VerifyWdfDeviceWdmDispatchIrpToIoQueue().

◆ GetMdl()

__inline PMDL FxIrp::GetMdl ( )

Definition at line 625 of file fxirpum.cpp.

627 {
628  return NULL;
629 }
#define NULL
Definition: types.h:112

Referenced by FxRequest::GetDeviceControlOutputMdl(), FxRequest::GetDeviceControlOutputMemoryObject(), FxRequest::GetMdl(), and FxRequest::GetMemoryObject().

◆ GetMdlAddressPointer()

__inline PMDL * FxIrp::GetMdlAddressPointer ( )

Definition at line 1323 of file fxirpum.cpp.

1325 {
1326  return NULL;
1327 }
#define NULL
Definition: types.h:112

Referenced by FxIoTarget::FormatIoctlRequest(), and FxIoTarget::FormatIoRequest().

◆ GetMinorFunction()

__inline UCHAR FxIrp::GetMinorFunction ( VOID  )

Definition at line 297 of file fxirpum.cpp.

300 {
301  UCHAR minorFunction;
302  IWudfPnpIrp * pPnpIrp = NULL;
303  IWudfIoIrp * pIoIrp = NULL;
304 
305  HRESULT hrQI = m_Irp->QueryInterface(IID_IWudfPnpIrp, (PVOID*)&pPnpIrp);
306  if (SUCCEEDED(hrQI)) {
307  minorFunction = pPnpIrp->GetMinorFunction();
308  pPnpIrp->Release();
309  }
310  else {
311  //
312  // If this is not PnP irp then this must be Io irp.
313  //
314  hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
315  FX_VERIFY(INTERNAL, CHECK_QI(hrQI, pIoIrp));
316  pIoIrp->Release();
317 
318  //
319  // Minor function is 0 for I/O irps (create/cleanup/close/read/write/
320  // ioctl).
321  //
322  minorFunction = 0;
323  }
324 
325  return minorFunction;
326 }
MdIrp m_Irp
Definition: fxirp.hpp:33
if SUCCEEDED(hr)
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
unsigned char UCHAR
Definition: xmlstorage.h:181
#define NULL
Definition: types.h:112

Referenced by FxDefaultIrpHandler::Dispatch(), FxPkgIo::Dispatch(), FxPkgPnp::Dispatch(), FxDevice::DispatchPreprocessedIrp(), FxPkgIo::DispatchStep1(), FxDevice::DispatchWithLock(), FxRequest::GetParameters(), IsPreprocessIrp(), FxPkgPnp::PnpFinishProcessingIrp(), PreprocessIrp(), FxIoTargetSelf::Send(), FxPkgPnp::SetPendingPnpIrp(), and VerifyWdfDeviceWdmDispatchIrpToIoQueue().

◆ GetNextCompletionRoutine()

__inline MdCompletionRoutine FxIrp::GetNextCompletionRoutine ( VOID  )

Definition at line 1206 of file fxirpum.cpp.

1209 {
1210 
1211  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1212  return NULL;
1213 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxIoQueue::QueueDriverCreatedRequest().

◆ GetNextIrpStackLocation()

__inline PIO_STACK_LOCATION FxIrp::GetNextIrpStackLocation ( VOID  )

Definition at line 387 of file fxirpum.cpp.

390 {
391 
392 
393 
394 
395  FX_VERIFY(INTERNAL, TRAPMSG("Common code using io stack location directly"));
396  return NULL;
397 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxFormatUsbRequest(), FxIoTargetRemote::GetTargetDeviceRelations(), SetParameterQDRType(), SetParameterQueryInterfaceInterface(), SetParameterQueryInterfaceInterfaceSpecificData(), SetParameterQueryInterfaceSize(), SetParameterQueryInterfaceType(), and SetParameterQueryInterfaceVersion().

◆ GetNextStackParameterOthersArgument1Pointer()

__inline PVOID * FxIrp::GetNextStackParameterOthersArgument1Pointer ( )

Definition at line 1421 of file fxirpum.cpp.

1423 {
1424 
1425 
1426 
1427 
1428 
1429  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1430  return NULL;
1431 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest().

◆ GetNextStackParameterOthersArgument2Pointer()

__inline PVOID * FxIrp::GetNextStackParameterOthersArgument2Pointer ( )

Definition at line 1434 of file fxirpum.cpp.

1436 {
1437 
1438 
1439 
1440 
1441 
1442  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1443  return NULL;
1444 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest().

◆ GetNextStackParameterOthersArgument4Pointer()

__inline PVOID * FxIrp::GetNextStackParameterOthersArgument4Pointer ( )

Definition at line 1447 of file fxirpum.cpp.

1449 {
1450 
1451 
1452 
1453 
1454 
1455  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1456  return NULL;
1457 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest().

◆ GetNextStackParameterUsageNotificationInPath()

__inline BOOLEAN FxIrp::GetNextStackParameterUsageNotificationInPath ( )

Definition at line 830 of file fxirpum.cpp.

832 {
833  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
834 
835  return FALSE;
836 }
#define FALSE
Definition: types.h:117
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetOutputBuffer()

__inline PVOID FxIrp::GetOutputBuffer ( )

Definition at line 594 of file fxirpum.cpp.

596 {
597  IWudfIoIrp * ioIrp = NULL;
598  PVOID outputBuffer = NULL;
599  HRESULT hr;
600 
601  ioIrp = GetIoIrp();
602 
603  switch (GetMajorFunction()) {
605  hr = ioIrp->RetrieveBuffers(NULL, // InputBufferCb
606  NULL, // InputBuffer
607  NULL, // OutputBufferCb
608  &outputBuffer // OutputBuffer
609  );
610  break;
611  default:
612  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
613  hr = E_NOTIMPL;
614  break;
615  }
616 
617  if (FAILED(hr)) {
618  outputBuffer = NULL;
619  }
620 
621  return outputBuffer;
622 }
HRESULT hr
Definition: shlfolder.c:183
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxRequest::AssignMemoryBuffers().

◆ GetParameterAllocatedResources()

__inline PCM_RESOURCE_LIST FxIrp::GetParameterAllocatedResources ( )

Definition at line 843 of file fxirpum.cpp.

845 {
846  IWudfPnpIrp * pnpIrp = NULL;
848 
849 
850 
851 
852 
853 
854  pnpIrp = static_cast<IWudfPnpIrp *>(m_Irp);
855 
856  res = pnpIrp->GetParameterAllocatedResources();
857 
858  //
859  // Release the ref even though we are returning a memory pointer from
860  // IWudfIrp object. This is fine because we know irp is valid for the
861  // lifetime of the caller who is calling this interface).
862  //
863 
864 
865  return res;
866 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613

Referenced by FxPkgPnp::PnpMatchResources(), and FxPkgFdo::PnpSendStartDeviceDownTheStackOverload().

◆ GetParameterAllocatedResourcesTranslated()

__inline PCM_RESOURCE_LIST FxIrp::GetParameterAllocatedResourcesTranslated ( )

Definition at line 877 of file fxirpum.cpp.

879 {
880  IWudfPnpIrp * pnpIrp = NULL;
882 
883 
884 
885 
886 
887 
888  pnpIrp = static_cast<IWudfPnpIrp *>(m_Irp);
889 
890  res = pnpIrp->GetParameterAllocatedResourcesTranslated();
891 
892 
893  return res;
894 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613

Referenced by FxPkgPnp::PnpMatchResources(), and FxPkgFdo::PnpSendStartDeviceDownTheStackOverload().

◆ GetParameterDeviceCapabilities()

__inline PDEVICE_CAPABILITIES FxIrp::GetParameterDeviceCapabilities ( )

Definition at line 1132 of file fxirpum.cpp.

1134 {
1135  IWudfPnpIrp * pQueryCapsIrp = GetPnpIrp();
1136  PDEVICE_CAPABILITIES deviceCapabilities;
1137 
1138  deviceCapabilities = pQueryCapsIrp->GetDeviceCapabilities();
1139 
1140  return deviceCapabilities;
1141 }
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPdo::_QueryCapsWorkItem().

◆ GetParameterIoctlCode()

__inline ULONG FxIrp::GetParameterIoctlCode ( VOID  )

Definition at line 1474 of file fxirpum.cpp.

1477 {
1478  IWudfIoIrp * ioIrp = NULL;
1479  ULONG ioControlCode = 0;
1480 
1482  ioIrp = GetIoIrp();
1483  ioIrp->GetDeviceIoControlParameters(&ioControlCode, NULL, NULL);
1484  }
1485 
1486  return ioControlCode;
1487 }
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxIoQueue::DispatchRequestToDriver(), FxPkgIo::DispatchStep1(), FxRequest::GetDeviceControlOutputMdl(), FxRequest::GetDeviceControlOutputMemoryObject(), FxRequest::GetMdl(), and FxRequest::GetMemoryObject().

◆ GetParameterIoctlCodeBufferMethod()

__inline ULONG FxIrp::GetParameterIoctlCodeBufferMethod ( VOID  )

Definition at line 1490 of file fxirpum.cpp.

1493 {
1494  //
1495  // For UMDF, always return METHOD_BUFFERED. This is because merged code
1496  // uses this info to decide how and where to fetch the buffers from, from
1497  // inside the irp, and for UMDF, the buffers are always fetched from host in
1498  // same manner irrespective of IOCTL type.
1499  //
1500  return METHOD_BUFFERED;
1501 }
#define METHOD_BUFFERED
Definition: nt_native.h:594

Referenced by FxRequest::AssignMemoryBuffers(), FxRequest::CompleteInternal(), FxRequestOutputBuffer::GetBuffer(), FxRequest::GetDeviceControlOutputMdl(), FxRequest::GetDeviceControlOutputMemoryObject(), FxRequestSystemBuffer::GetFlags(), FxRequestOutputBuffer::GetFlags(), FxRequestOutputBuffer::GetMdl(), FxRequest::GetMdl(), FxRequest::GetMemoryObject(), and FxRequest::GetParameters().

◆ GetParameterIoctlInputBufferLength()

__inline ULONG FxIrp::GetParameterIoctlInputBufferLength ( VOID  )

Definition at line 1518 of file fxirpum.cpp.

1521 {
1522  IWudfIoIrp * ioIrp = NULL;
1523  ULONG inputBufferLength;
1524 
1525  ioIrp = GetIoIrp();
1526  ioIrp->GetDeviceIoControlParameters(NULL, &inputBufferLength, NULL);
1527 
1528  return inputBufferLength;
1529 }
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1

Referenced by FxIoQueue::DispatchRequestToDriver(), FxRequestSystemBuffer::GetBufferSize(), FxRequest::GetMdl(), and FxRequest::GetMemoryObject().

◆ GetParameterIoctlOutputBufferLength()

__inline ULONG FxIrp::GetParameterIoctlOutputBufferLength ( VOID  )

Definition at line 1504 of file fxirpum.cpp.

1507 {
1508  IWudfIoIrp * ioIrp = NULL;
1509  ULONG outputBufferLength;
1510 
1511  ioIrp = GetIoIrp();
1512  ioIrp->GetDeviceIoControlParameters(NULL, NULL, &outputBufferLength);
1513 
1514  return outputBufferLength;
1515 }
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1

Referenced by FxRequest::CompleteInternal(), FxIoQueue::DispatchRequestToDriver(), FxRequestOutputBuffer::GetBufferSize(), FxRequest::GetDeviceControlOutputMdl(), and FxRequest::GetDeviceControlOutputMemoryObject().

◆ GetParameterIoctlType3InputBuffer()

__inline PVOID FxIrp::GetParameterIoctlType3InputBuffer ( VOID  )

Definition at line 1542 of file fxirpum.cpp.

1545 {
1546 
1547 
1548 
1549 
1550 
1551  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1552  return NULL;
1553 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

Referenced by FxRequest::AssignMemoryBuffers().

◆ GetParameterPowerShutdownType()

__inline POWER_ACTION FxIrp::GetParameterPowerShutdownType ( )

Definition at line 719 of file fxirpum.cpp.

721 {
722  POWER_ACTION powerAction;
723 
724  powerAction = GetPnpIrp()->GetPowerAction();
725 
726  return powerAction;
727 }
POWER_ACTION
Definition: ntpoapi.h:122
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPnp::PowerGotoDxIoStopped(), and FxPkgPnp::PowerGotoDxIoStoppedNP().

◆ GetParameterPowerState()

__inline POWER_STATE FxIrp::GetParameterPowerState ( )

Definition at line 1015 of file fxirpum.cpp.

1017 {
1018  IWudfPnpIrp * pnpIrp = NULL;
1019  POWER_STATE powerState;
1020 
1021 
1022 
1023 
1024 
1025 
1026  pnpIrp = static_cast<IWudfPnpIrp *>(m_Irp);
1027 
1028  powerState = pnpIrp->GetPowerState();
1029 
1030 
1031  return powerState;
1032 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define NULL
Definition: types.h:112

◆ GetParameterPowerStateDeviceState()

__inline DEVICE_POWER_STATE FxIrp::GetParameterPowerStateDeviceState ( )

Definition at line 695 of file fxirpum.cpp.

697 {
698  DEVICE_POWER_STATE devicePowerState;
699 
700  devicePowerState = GetPnpIrp()->GetPowerStateDeviceState();
701 
702  return devicePowerState;
703 }
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPnp::Dispatch(), FxPkgPnp::IsDevicePowerUpIrpPending(), FxPkgPnp::PowerGotoDxIoStopped(), FxPkgPnp::PowerGotoDxIoStoppedNP(), and FxPkgFdo::PowerReleasePendingDeviceIrp().

◆ GetParameterPowerStateSystemState()

__inline SYSTEM_POWER_STATE FxIrp::GetParameterPowerStateSystemState ( )

Definition at line 707 of file fxirpum.cpp.

709 {
710  SYSTEM_POWER_STATE systemPowerState;
711 
712  systemPowerState = GetPnpIrp()->GetPowerStateSystemState();
713 
714  return systemPowerState;
715 }
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPnp::Dispatch(), and FxPkgPnp::PowerPolicyCompleteSystemPowerIrp().

◆ GetParameterPowerSystemPowerStateContext()

__inline SYSTEM_POWER_STATE_CONTEXT FxIrp::GetParameterPowerSystemPowerStateContext ( )

Definition at line 671 of file fxirpum.cpp.

673 {
674  SYSTEM_POWER_STATE_CONTEXT systemPwrStateContext = {0};
675 
676  systemPwrStateContext.ContextAsUlong = GetPnpIrp()->GetSystemPowerStateContext();
677 
678  return systemPwrStateContext;
679 }
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPnp::PowerPolicyGetPendingSystemState().

◆ GetParameterPowerType()

__inline POWER_STATE_TYPE FxIrp::GetParameterPowerType ( )

Definition at line 683 of file fxirpum.cpp.

685 {
686  POWER_STATE_TYPE powerType;
687 
688  powerType = GetPnpIrp()->GetPowerType();
689 
690  return powerType;
691 }
enum _POWER_STATE_TYPE POWER_STATE_TYPE
IWudfPnpIrp * GetPnpIrp(VOID)
Definition: fxirpum.cpp:1797

Referenced by FxPkgPnp::Dispatch().

◆ GetParameterQDRType()

__inline DEVICE_RELATION_TYPE FxIrp::GetParameterQDRType ( )

Definition at line 731 of file fxirpum.cpp.

733 {
734  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
735 
736  return BusRelations;
737 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxPkgPnp::Dispatch().

◆ GetParameterQueryDeviceTextLocaleId()

__inline LCID FxIrp::GetParameterQueryDeviceTextLocaleId ( )

Definition at line 975 of file fxirpum.cpp.

977 {
978  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
979 
980  return (LCID)(-1);
981 }
DWORD LCID
Definition: nls.h:13
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterQueryDeviceTextType()

__inline DEVICE_TEXT_TYPE FxIrp::GetParameterQueryDeviceTextType ( )

Definition at line 984 of file fxirpum.cpp.

986 {
987  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
988 
989  return (DEVICE_TEXT_TYPE)(-1);
990 }
enum _DEVICE_TEXT_TYPE DEVICE_TEXT_TYPE
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterQueryIdType()

__inline BUS_QUERY_ID_TYPE FxIrp::GetParameterQueryIdType ( )

Definition at line 1006 of file fxirpum.cpp.

1008 {
1009  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
1010 
1011  return (BUS_QUERY_ID_TYPE)(-1);
1012 }
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterQueryInterfaceInterface()

__inline PINTERFACE FxIrp::GetParameterQueryInterfaceInterface ( )

Definition at line 746 of file fxirpum.cpp.

748 {
749  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
750 
751  return NULL;
752 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetParameterQueryInterfaceInterfaceSpecificData()

__inline PVOID FxIrp::GetParameterQueryInterfaceInterfaceSpecificData ( )

Definition at line 785 of file fxirpum.cpp.

787 {
788  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
789 
790  return NULL;
791 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetParameterQueryInterfaceSize()

__inline USHORT FxIrp::GetParameterQueryInterfaceSize ( )

Definition at line 775 of file fxirpum.cpp.

777 {
778  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
779 
780  return 0;
781 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterQueryInterfaceType()

__inline const GUID * FxIrp::GetParameterQueryInterfaceType ( )

Definition at line 755 of file fxirpum.cpp.

757 {
758  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
759 
760  return NULL;
761 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetParameterQueryInterfaceVersion()

__inline USHORT FxIrp::GetParameterQueryInterfaceVersion ( )

Definition at line 765 of file fxirpum.cpp.

767 {
768  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
769 
770  return 0;
771 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterReadLength()

__inline ULONG FxIrp::GetParameterReadLength ( VOID  )

Definition at line 1589 of file fxirpum.cpp.

1592 {
1593  ULONG length;
1594 
1595  GetIoIrp()->GetReadParameters(&length, NULL, NULL);
1596 
1597  return length;
1598 }
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1

Referenced by FxIoQueue::DispatchRequestToDriver(), FxRequestSystemBuffer::GetBufferSize(), FxRequest::GetMdl(), FxRequest::GetMemoryObject(), and FxIoQueue::GetRequest().

◆ GetParameterSetLockLock()

__inline BOOLEAN FxIrp::GetParameterSetLockLock ( )

Definition at line 993 of file fxirpum.cpp.

995 {
996  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
997 
998  return FALSE;
999 }
#define FALSE
Definition: types.h:117
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterUsageNotificationInPath()

__inline BOOLEAN FxIrp::GetParameterUsageNotificationInPath ( )

Definition at line 811 of file fxirpum.cpp.

813 {
814  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
815 
816  return FALSE;
817 }
#define FALSE
Definition: types.h:117
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterUsageNotificationType()

__inline DEVICE_USAGE_NOTIFICATION_TYPE FxIrp::GetParameterUsageNotificationType ( )

Definition at line 801 of file fxirpum.cpp.

803 {
804  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
805 
807 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterWriteByteOffsetQuadPart()

__inline LONGLONG FxIrp::GetParameterWriteByteOffsetQuadPart ( )

Definition at line 1373 of file fxirpum.cpp.

1375 {
1376 
1377 
1378 
1379 
1380  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1381  return 0;
1382 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetParameterWriteLength()

__inline ULONG FxIrp::GetParameterWriteLength ( VOID  )

Definition at line 1601 of file fxirpum.cpp.

1604 {
1605  ULONG length;
1606 
1607  GetIoIrp()->GetWriteParameters(&length, NULL, NULL);
1608 
1609  return length;
1610 }
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1

Referenced by FxIoQueue::DispatchRequestToDriver(), FxRequestSystemBuffer::GetBufferSize(), FxRequest::GetMdl(), FxRequest::GetMemoryObject(), and FxIoQueue::GetRequest().

◆ GetPnpIrp()

IWudfPnpIrp * FxIrp::GetPnpIrp ( VOID  )

Definition at line 1797 of file fxirpum.cpp.

1800 {
1801  IWudfPnpIrp* pPnpIrp;
1802  HRESULT hrQI;
1803 
1804  hrQI = m_Irp->QueryInterface(IID_IWudfPnpIrp, (PVOID*)&pPnpIrp);
1805  FX_VERIFY(INTERNAL, CHECK_QI(hrQI, pPnpIrp));
1806  pPnpIrp->Release();
1807 
1808  //
1809  // Now that we confirmed the irp is a pnp irp, just return the underlying
1810  // irp.
1811  //
1812  return static_cast<IWudfPnpIrp*>(m_Irp);
1813 }
MdIrp m_Irp
Definition: fxirp.hpp:33
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()

Referenced by GetParameterDeviceCapabilities(), GetParameterPowerShutdownType(), GetParameterPowerStateDeviceState(), GetParameterPowerStateSystemState(), GetParameterPowerSystemPowerStateContext(), and GetParameterPowerType().

◆ GetRequestorMode()

__inline KPROCESSOR_MODE FxIrp::GetRequestorMode ( VOID  )

Definition at line 329 of file fxirpum.cpp.

332 {
333  IWudfIoIrp * pIoIrp = NULL;
334 
335  HRESULT hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
336 
337  if (SUCCEEDED(hrQI)) {
338  KPROCESSOR_MODE requestorMode;
339 
340  requestorMode = pIoIrp->GetRequestorMode();
341  pIoIrp->Release();
342 
343  return requestorMode;
344  }
345  else {
346  return KernelMode;
347  }
348 }
MdIrp m_Irp
Definition: fxirp.hpp:33
if SUCCEEDED(hr)
HRESULT hrQI
Definition: framework.cpp:106
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define NULL
Definition: types.h:112

Referenced by FxRequest::AssignMemoryBuffers(), FxRequest::CompleteInternal(), FxRequest::GetDeviceControlOutputMemoryObject(), FxRequest::GetMemoryObject(), and FxRequest::GetRequestorMode().

◆ GetStackCount()

__inline CCHAR FxIrp::GetStackCount ( )

Definition at line 1304 of file fxirpum.cpp.

1306 {
1307 
1308  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1309  return 0;
1310 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ GetStatus()

◆ GetStatusBlock()

__inline PIO_STATUS_BLOCK FxIrp::GetStatusBlock ( VOID  )

Definition at line 1664 of file fxirpum.cpp.

1667 {
1668  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1669  return NULL;
1670 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetSystemBuffer()

__inline PVOID FxIrp::GetSystemBuffer ( )

Definition at line 543 of file fxirpum.cpp.

545 {
546  IWudfIoIrp * ioIrp = NULL;
547  PVOID systemBuffer = NULL;
548  HRESULT hr;
549 
550  ioIrp = GetIoIrp();
551 
552  switch (GetMajorFunction()) {
553  case IRP_MJ_WRITE:
554  //
555  // For write host provides the buffer as input buffer
556  //
557  hr = ioIrp->RetrieveBuffers(NULL, // InputBufferCb
558  &systemBuffer,// InputBuffer
559  NULL, // OutputBufferCb
560  NULL // OutputBuffer
561  );
562  break;
563  case IRP_MJ_READ:
564  //
565  // For read host provides the buffer as output buffer
566  //
567  hr = ioIrp->RetrieveBuffers(NULL, // InputBufferCb
568  NULL, // InputBuffer
569  NULL, // OutputBufferCb
570  &systemBuffer // OutputBuffer
571  );
572  break;
574  hr = ioIrp->RetrieveBuffers(NULL, // InputBufferCb
575  &systemBuffer,// InputBuffer
576  NULL, // OutputBufferCb
577  NULL // OutputBuffer
578  );
579  break;
580  default:
581  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
582  hr = E_NOTIMPL;
583  break;
584  }
585 
586  if (FAILED(hr)) {
587  systemBuffer = NULL;
588  }
589 
590  return systemBuffer;
591 }
HRESULT hr
Definition: shlfolder.c:183
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
LONG HRESULT
Definition: typedefs.h:79
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxRequest::AssignMemoryBuffers(), FxIoTarget::FormatIoctlRequest(), FxIoTarget::FormatIoRequest(), FxRequest::GetDeviceControlOutputMdl(), and FxRequest::GetMdl().

◆ GetThread()

__inline MdEThread FxIrp::GetThread ( VOID  )

Definition at line 1631 of file fxirpum.cpp.

1634 {
1635  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1636  return NULL;
1637 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NULL
Definition: types.h:112

◆ GetUserBuffer()

__inline PVOID FxIrp::GetUserBuffer ( )

Definition at line 633 of file fxirpum.cpp.

635 {
636  //
637  // UserBuffer is used with METHOD_NEITHER
638  // For METHOD_NEITHER reflector still makes a copy of the buffer
639  // in common buffer (if METHOD_NEITHER is enabled via regkey)
640  //
641 
642  IWudfIoIrp * ioIrp = GetIoIrp();
643  PVOID userBuffer;
644  HRESULT hr;
645 
646  hr = ioIrp->RetrieveBuffers(NULL, // InputBufferCb
647  NULL, // InputBuffer
648  NULL, // OutputBufferCb
649  &userBuffer // OutputBuffer
650  );
651  if (FAILED(hr))
652  {
653  userBuffer = NULL;
654  }
655 
656  return userBuffer;
657 }
HRESULT hr
Definition: shlfolder.c:183
LONG HRESULT
Definition: typedefs.h:79
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777
#define NULL
Definition: types.h:112

Referenced by FxRequest::AssignMemoryBuffers(), and FxIoContext::CopyParameters().

◆ HasStack()

__inline BOOLEAN FxIrp::HasStack ( _In_ UCHAR  StackCount)

Definition at line 1745 of file fxirpum.cpp.

1748 {
1749  UNREFERENCED_PARAMETER(StackCount);
1750 
1751 
1752 
1753 
1754 
1755 
1756 
1757  return TRUE;
1758 }
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ InitNextStackUsingStack()

__inline VOID FxIrp::InitNextStackUsingStack ( __in FxIrp Irp)

Definition at line 1035 of file fxirpum.cpp.

1038 {
1039  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
1040 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ Is32bitProcess()

__inline BOOLEAN FxIrp::Is32bitProcess ( VOID  )

Definition at line 1640 of file fxirpum.cpp.

1643 {
1644  return (GetIoIrp()->IsFrom32BitProcess() ? TRUE : FALSE);
1645 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777

◆ IsCanceled()

__inline BOOLEAN FxIrp::IsCanceled ( )

Definition at line 484 of file fxirpum.cpp.

486 {
487  return (m_Irp->IsCanceled() ? TRUE: FALSE);
488 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117

Referenced by FxIrpQueue::InsertIrpInQueue(), FxRequest::IsCancelled(), FxIrpQueue::PeekRequest(), and FxPkgPnp::PowerMakeWakeRequestNonCancelable().

◆ IsCurrentIrpStackLocationValid()

__inline BOOLEAN FxIrp::IsCurrentIrpStackLocationValid ( VOID  )

Definition at line 1761 of file fxirpum.cpp.

1764 {
1765 
1766 
1767 
1768 
1769 
1770 
1771 
1772 
1773  return TRUE;
1774 }
#define TRUE
Definition: types.h:120

Referenced by FxIoTarget::PendRequestLocked(), and FxRequest::Reuse().

◆ ListEntry()

__inline PLIST_ENTRY FxIrp::ListEntry ( )

◆ MarkIrpPending()

__inline VOID FxIrp::MarkIrpPending ( )

Definition at line 415 of file fxirpum.cpp.

418 {
419 
420 
421 
422 
423 
424  m_Irp->MarkIrpPending();
425 }
MdIrp m_Irp
Definition: fxirp.hpp:33

Referenced by FxPkgIo::DispathToInCallerContextCallback(), FxIrpQueue::InsertIrpInQueue(), and FxIoQueue::QueueRequest().

◆ PendingReturned()

__inline BOOLEAN FxIrp::PendingReturned ( )

Definition at line 429 of file fxirpum.cpp.

432 {
433 
434 
435 
436 
437 
438  return m_Irp->PendingReturned();
439 }
MdIrp m_Irp
Definition: fxirp.hpp:33

◆ PoCallDriver()

__inline NTSTATUS FxIrp::PoCallDriver ( __in MdDeviceObject  DeviceObject)

Definition at line 48 of file fxirpum.cpp.

51 {
53 
54  m_Irp->Forward();
55  return STATUS_SUCCESS;
56 }
MdIrp m_Irp
Definition: fxirp.hpp:33
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ PropagatePendingReturned()

__inline VOID FxIrp::PropagatePendingReturned ( VOID  )

Definition at line 443 of file fxirpum.cpp.

446 {
447 
448 
449 
450 
451 
452  m_Irp->PropagatePendingReturned();
453 }
MdIrp m_Irp
Definition: fxirp.hpp:33

◆ RequestPowerIrp()

_Must_inspect_result_ __inline NTSTATUS FxIrp::RequestPowerIrp ( __in MdDeviceObject  DeviceObject,
__in UCHAR  MinorFunction,
__in POWER_STATE  PowerState,
__in MdRequestPowerComplete  CompletionFunction,
__in PVOID  Context 
)
static

Definition at line 1047 of file fxirpum.cpp.

1054 {
1055  HRESULT hr;
1056  IWudfDevice* deviceObject;
1057  IWudfDeviceStack *deviceStack;
1058 
1060  deviceStack = deviceObject->GetDeviceStackInterface();
1061 
1062  hr = deviceStack->RequestPowerIrp(MinorFunction,
1063  PowerState,
1065  Context);
1066 
1067  if (S_OK == hr)
1068  {
1069  return STATUS_SUCCESS;
1070  }
1071  else
1072  {
1073  PUMDF_VERSION_DATA driverVersion = deviceStack->GetMinDriverVersion();
1074 
1075  BOOL preserveCompat =
1076  deviceStack->ShouldPreserveIrpCompletionStatusCompatibility();
1077 
1078  return CHostFxUtil::NtStatusFromHr(
1079  hr,
1080  driverVersion->MajorNumber,
1081  driverVersion->MinorNumber,
1082  preserveCompat
1083  );
1084  }
1085 }
HRESULT hr
Definition: shlfolder.c:183
IWudfDeviceStack * deviceStack
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_ UCHAR _In_ UCHAR MinorFunction
Definition: wdfdevice.h:1697
LONG HRESULT
Definition: typedefs.h:79
_In_ UCHAR _In_ POWER_STATE _In_opt_ PREQUEST_POWER_COMPLETE CompletionFunction
Definition: pofuncs.h:42
MxDeviceObject deviceObject
#define S_OK
Definition: intsafe.h:52
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3032
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by FxPkgPnp::PowerPolicySendDevicePowerRequest(), and FxPkgPnp::PowerPolicySendWaitWakeRequest().

◆ Reuse()

__inline VOID FxIrp::Reuse ( __in NTSTATUS  Status = STATUS_SUCCESS)

Definition at line 661 of file fxirpum.cpp.

664 {
665  GetIoIrp()->Reuse(Status);
666  return;
667 }
Status
Definition: gdiplustypes.h:24
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777

Referenced by FxUsbUmFormatRequest(), FxRequest::Reuse(), and FxUsbDevice::SelectConfig().

◆ SendIrpSynchronously()

__inline NTSTATUS FxIrp::SendIrpSynchronously ( __in MdDeviceObject  DeviceObject)

Definition at line 151 of file fxirpum.cpp.

154 {
156  HANDLE event;
157 
159 
160  event = CreateEvent(
161  NULL,
162  TRUE, //bManualReset
163  FALSE, //bInitialState
164  NULL //Name
165  );
166 
167  if (NULL == event)
168  {
169 #pragma prefast(suppress:__WARNING_MUST_USE, "we convert all Win32 errors into a generic failure currently")
170  DWORD err = GetLastError();
171 
172  //
173  // As such event creation would fail only for resource reasons if we pass
174  // correct parameters
175  //
176 
178 
180  FX_TRACE_IO,
181  "Failed to create event, error: %!WINERROR!, "
182  "returning %!STATUS!",
183  err, status);
184 
185  }
186 
187  if (NT_SUCCESS(status))
188  {
190  event,
191  TRUE,
192  TRUE,
193  TRUE);
194 
195  m_Irp->Forward();
196 
198  FX_VERIFY(INTERNAL, CHECK("INFNITE wait failed",
199  (retval == WAIT_OBJECT_0)));
200 
201  status = this->GetStatus();
202  }
203 
204  return status;
205 }
#define CreateEvent
Definition: winbase.h:3604
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
MdIrp m_Irp
Definition: fxirp.hpp:33
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
LONG NTSTATUS
Definition: precomp.h:26
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define CHECK(type, val, base, expected)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define FALSE
Definition: types.h:117
VOID SetCompletionRoutine(__in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
Definition: fxirpum.cpp:72
#define WAIT_OBJECT_0
Definition: winbase.h:403
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define err(...)
struct _cl_event * event
Definition: glext.h:7739
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TraceEvents(a, b, c, d, e)
Definition: fxirpum.cpp:12
#define NULL
Definition: types.h:112
#define STATUS_SUCCESS
Definition: shellext.h:65
#define INFINITE
Definition: serial.h:102
static NTSTATUS STDCALL _IrpSynchronousCompletion(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp, __in PVOID Context)
Definition: fxirpum.cpp:133
static SERVICE_STATUS status
Definition: service.c:31
NTSTATUS GetStatus()
Definition: fxirpum.cpp:466
Definition: ps.c:97

Referenced by FxQueryInterface::_QueryForInterface(), GetStackCapabilities(), FxIoTargetRemote::GetTargetDeviceRelations(), and FxPkgPnp::QueryForD3ColdInterface().

◆ SetCancel()

__inline VOID FxIrp::SetCancel ( __in BOOLEAN  Cancel)

Definition at line 1294 of file fxirpum.cpp.

1297 {
1299 
1300  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1301 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
BOOLEAN Cancel(VOID)
Definition: fxirpum.cpp:475

Referenced by FxRequest::Reuse().

◆ SetCancelRoutine()

__inline MdCancelRoutine FxIrp::SetCancelRoutine ( __in_opt MdCancelRoutine  CancelRoutine)

Definition at line 124 of file fxirpum.cpp.

127 {
128  return m_Irp->SetCancelRoutine(CancelRoutine);
129 }
MdIrp m_Irp
Definition: fxirp.hpp:33
_In_opt_ PDRIVER_CANCEL CancelRoutine
Definition: iofuncs.h:2744

Referenced by FxIrpQueue::InsertIrpInQueue(), FxPkgPnp::PowerMakeWakeRequestNonCancelable(), FxIrpQueue::RemoveIrpFromQueueByContext(), and FxIrpQueue::RemoveNextIrpFromQueue().

◆ SetCompletionRoutine()

__inline VOID FxIrp::SetCompletionRoutine ( __in MdCompletionRoutine  CompletionRoutine,
__in PVOID  Context,
__in BOOLEAN  InvokeOnSuccess = TRUE,
__in BOOLEAN  InvokeOnError = TRUE,
__in BOOLEAN  InvokeOnCancel = TRUE 
)

Definition at line 72 of file fxirpum.cpp.

79 {
83 
84  //
85  // In UMDF completion callback is invoked in all three cases, there isn't an option
86  // to invoke it selectively
87 
88 
89 
90 
91  FX_VERIFY(INTERNAL, CHECK(
92  "UMDF completion routine can't be invoked selectively on Success/Error/Cancel",
93  (TRUE == InvokeOnSuccess) &&
94  (TRUE == InvokeOnError) &&
95  (TRUE == InvokeOnCancel)));
96 
97  m_Irp->SetCompletionRoutine(
99  Context
100  );
101 }
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
Definition: iofuncs.h:1939
MdIrp m_Irp
Definition: fxirp.hpp:33
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define CHECK(type, val, base, expected)
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
Definition: iofuncs.h:1939
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
Definition: iofuncs.h:1939
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:893

Referenced by SendIrpSynchronously(), and SetCompletionRoutineEx().

◆ SetCompletionRoutineEx()

__inline VOID FxIrp::SetCompletionRoutineEx ( __in MdDeviceObject  DeviceObject,
__in MdCompletionRoutine  CompletionRoutine,
__in PVOID  Context,
__in BOOLEAN  InvokeOnSuccess = TRUE,
__in BOOLEAN  InvokeOnError = TRUE,
__in BOOLEAN  InvokeOnCancel = TRUE 
)

Definition at line 104 of file fxirpum.cpp.

112 {
114 
117  Context,
121 }
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
Definition: iofuncs.h:1939
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
VOID SetCompletionRoutine(__in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
Definition: fxirpum.cpp:72
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
Definition: iofuncs.h:1939
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
Definition: iofuncs.h:1939
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:893

Referenced by FxDevice::_AcquireOptinRemoveLock(), FxPkgFdo::PnpSendStartDeviceDownTheStackOverload(), and FxIoTarget::SetCompletionRoutine().

◆ SetContext()

__inline VOID FxIrp::SetContext ( __in ULONG  Index,
__in PVOID  Value 
)

Definition at line 351 of file fxirpum.cpp.

355 {
356  m_Irp->SetContext(Index, Value);
357 }
MdIrp m_Irp
Definition: fxirp.hpp:33
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by FxIrpQueue::InsertIrpInQueue(), FxIrpQueue::RemoveIrpFromQueueByContext(), FxIrpQueue::RemoveNextIrpFromQueue(), and FxRequestBase::ZeroOutDriverContext().

◆ SetCurrentDeviceObject()

__inline VOID FxIrp::SetCurrentDeviceObject ( __in MdDeviceObject  DeviceObject)

Definition at line 1362 of file fxirpum.cpp.

1365 {
1367 
1368 
1369  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1370 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoQueue::ForwardRequestToParent(), FxIoQueue::QueueDriverCreatedRequest(), and FxIoTargetSelf::Send().

◆ SetFlags()

__inline VOID FxIrp::SetFlags ( __in ULONG  Flags)

Definition at line 1266 of file fxirpum.cpp.

1269 {
1271 
1272 
1273 
1274 
1275 
1276 
1277  FX_VERIFY(INTERNAL, CHECK_TODO(Flags == 0));
1278 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxRequest::CompleteInternal(), and FxIoContext::ReleaseAndRestore().

◆ SetInformation()

◆ SetIrp()

◆ SetMajorFunction()

__inline VOID FxIrp::SetMajorFunction ( __in UCHAR  MajorFunction)

Definition at line 905 of file fxirpum.cpp.

908 {
909  IWudfIoIrp * pIoIrp = NULL;
910 
911  //
912  // IWudfIrp does not expose a method to set major function code directly so
913  // map it to WdfRequestType.
914  //
915  HRESULT hrQI = m_Irp->QueryInterface(IID_IWudfIoIrp, (PVOID*)&pIoIrp);
916  if (SUCCEEDED(hrQI)) {
918 
919  //
920  // for Io irp, map major function to request type
921  //
922  switch(MajorFunction) {
923  case IRP_MJ_CREATE:
924  type = UMINT::WdfRequestCreate;
925  break;
926  case IRP_MJ_CLEANUP:
927  type = UMINT::WdfRequestCleanup;
928  break;
929  case IRP_MJ_READ:
930  type = UMINT::WdfRequestRead;
931  break;
932  case IRP_MJ_WRITE:
933  type = UMINT::WdfRequestWrite;
934  break;
936  type = UMINT::WdfRequestDeviceIoControl;
937  break;
938  case IRP_MJ_CLOSE:
939  type = UMINT::WdfRequestClose;
940  break;
942  type = UMINT::WdfRequestInternalIoctl;
943  break;
945  type = UMINT::WdfRequestFlushBuffers;
946  break;
948  type = UMINT::WdfRequestQueryInformation;
949  break;
951  type = UMINT::WdfRequestSetInformation;
952  break;
953  default:
954  FX_VERIFY(INTERNAL, TRAPMSG("The request type is not expected"));
955  type = UMINT::WdfRequestUndefined;
956  }
957 
958  pIoIrp->SetTypeForNextStackLocation(type);
959  pIoIrp->Release();
960  }
961  else {
962  FX_VERIFY(INTERNAL, TRAPMSG("Not expected"));
963  }
964 }
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
MdIrp m_Irp
Definition: fxirp.hpp:33
#define IRP_MJ_FLUSH_BUFFERS
if SUCCEEDED(hr)
HRESULT hrQI
Definition: framework.cpp:106
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
enum _WDF_REQUEST_TYPE WDF_REQUEST_TYPE
LONG HRESULT
Definition: typedefs.h:79
nsrefcnt Release()
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
#define NULL
Definition: types.h:112
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CLEANUP
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest(), FxIoTarget::FormatIoctlRequest(), FxIoTarget::FormatIoRequest(), FxFormatUsbRequest(), GetStackCapabilities(), and FxPkgPnp::QueryForD3ColdInterface().

◆ SetMdlAddress()

__inline VOID FxIrp::SetMdlAddress ( __in PMDL  Value)

Definition at line 1330 of file fxirpum.cpp.

1333 {
1334  //
1335  // MDL is not supported in UMDF so must be NULL.
1336  //
1337  FX_VERIFY(INTERNAL, CHECK_NULL(Value));
1338 }
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoContext::ReleaseAndRestore().

◆ SetMinorFunction()

__inline VOID FxIrp::SetMinorFunction ( __in UCHAR  MinorFunction)

Definition at line 967 of file fxirpum.cpp.

970 {
971  FX_VERIFY(INTERNAL, TRAPMSG("Not supported"));
972 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by GetStackCapabilities(), and FxPkgPnp::QueryForD3ColdInterface().

◆ SetNextIrpStackLocation()

__inline VOID FxIrp::SetNextIrpStackLocation ( VOID  )

◆ SetNextParameterWriteByteOffsetQuadPart()

__inline VOID FxIrp::SetNextParameterWriteByteOffsetQuadPart ( __in LONGLONG  DeviceOffset)

Definition at line 1385 of file fxirpum.cpp.

1388 {
1390 
1391 
1392 
1393 
1394  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1395 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG DeviceOffset
Definition: wdfiotarget.h:859
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoRequest().

◆ SetNextParameterWriteLength()

__inline VOID FxIrp::SetNextParameterWriteLength ( __in ULONG  IoLength)

Definition at line 1398 of file fxirpum.cpp.

1401 {
1402  UNREFERENCED_PARAMETER(IoLength);
1403 
1404 
1405 
1406 
1407  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1408 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoRequest().

◆ SetNextStackFileObject()

__inline VOID FxIrp::SetNextStackFileObject ( _In_ MdFileObject  FileObject)

Definition at line 1573 of file fxirpum.cpp.

1576 {
1577  GetIoIrp()->SetFileForNextIrpStackLocation(FileObject);
1578 }
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
IWudfIoIrp * GetIoIrp(VOID)
Definition: fxirpum.cpp:1777

Referenced by FxIoTarget::CopyFileObjectAndFlags().

◆ SetNextStackFlags()

__inline VOID FxIrp::SetNextStackFlags ( __in UCHAR  Flags)

Definition at line 1556 of file fxirpum.cpp.

1559 {
1561 
1562 
1563 
1564 
1565 
1566 
1567 
1568 
1569  DO_NOTHING();
1570 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define DO_NOTHING()
Definition: mxgeneral.h:32

Referenced by FxIoTarget::CopyFileObjectAndFlags().

◆ SetNextStackParameterOthersArgument1()

__inline VOID FxIrp::SetNextStackParameterOthersArgument1 ( __in PVOID  Argument1)

Definition at line 1411 of file fxirpum.cpp.

1414 {
1416 
1417  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1418 }
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxFormatUsbRequest().

◆ SetParameterAllocatedResources()

__inline VOID FxIrp::SetParameterAllocatedResources ( __in PCM_RESOURCE_LIST  AllocatedResources)

Definition at line 869 of file fxirpum.cpp.

872 {
873  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
874 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxPkgFdo::PnpSendStartDeviceDownTheStackOverload().

◆ SetParameterAllocatedResourcesTranslated()

__inline VOID FxIrp::SetParameterAllocatedResourcesTranslated ( __in PCM_RESOURCE_LIST  AllocatedResourcesTranslated)

Definition at line 897 of file fxirpum.cpp.

900 {
901  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
902 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxPkgFdo::PnpSendStartDeviceDownTheStackOverload().

◆ SetParameterDeviceCapabilities()

__inline VOID FxIrp::SetParameterDeviceCapabilities ( __in PDEVICE_CAPABILITIES  DeviceCapabilities)

Definition at line 1145 of file fxirpum.cpp.

1148 {
1149  FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
1150 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by GetStackCapabilities().

◆ SetParameterIoctlCode()

__inline VOID FxIrp::SetParameterIoctlCode ( __in ULONG  DeviceIoControlCode)

Definition at line 1157 of file fxirpum.cpp.

1160 {
1161  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1162 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatInternalIoctlOthersRequest(), FxIoTarget::FormatIoctlRequest(), and FxFormatUsbRequest().

◆ SetParameterIoctlInputBufferLength()

__inline VOID FxIrp::SetParameterIoctlInputBufferLength ( __in ULONG  InputBufferLength)

Definition at line 1166 of file fxirpum.cpp.

1169 {
1170  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1171 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoctlRequest().

◆ SetParameterIoctlOutputBufferLength()

__inline VOID FxIrp::SetParameterIoctlOutputBufferLength ( __in ULONG  OutputBufferLength)

Definition at line 1532 of file fxirpum.cpp.

1535 {
1537 
1538  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1539 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:318
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoctlRequest().

◆ SetParameterIoctlType3InputBuffer()

__inline VOID FxIrp::SetParameterIoctlType3InputBuffer ( __in PVOID  Type3InputBuffer)

Definition at line 1175 of file fxirpum.cpp.

1178 {
1179  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1180 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoctlRequest().

◆ SetParameterQDRType()

__inline VOID FxIrp::SetParameterQDRType ( __in DEVICE_RELATION_TYPE  DeviceRelation)

Definition at line 678 of file fxirpkm.hpp.

681 {
682  this->GetNextIrpStackLocation()->
683  Parameters.QueryDeviceRelations.Type = DeviceRelation;
684 }
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct _IO_STACK_LOCATION::@3729::@3754 QueryDeviceRelations
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387

◆ SetParameterQueryInterfaceInterface()

__inline VOID FxIrp::SetParameterQueryInterfaceInterface ( __in PINTERFACE  Interface)

Definition at line 1053 of file fxirpkm.hpp.

1056 {
1057  this->GetNextIrpStackLocation()->
1058  Parameters.QueryInterface.Interface = Interface;
1059 }
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct _IO_STACK_LOCATION::@3729::@3755 QueryInterface
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361

Referenced by FxPkgPnp::QueryForD3ColdInterface().

◆ SetParameterQueryInterfaceInterfaceSpecificData()

__inline VOID FxIrp::SetParameterQueryInterfaceInterfaceSpecificData ( __in PVOID  InterfaceSpecificData)

Definition at line 1091 of file fxirpkm.hpp.

1094 {
1095  this->GetNextIrpStackLocation()->
1096  Parameters.QueryInterface.InterfaceSpecificData = InterfaceSpecificData;
1097 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:461
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct _IO_STACK_LOCATION::@3729::@3755 QueryInterface
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387

Referenced by FxPkgPnp::QueryForD3ColdInterface().

◆ SetParameterQueryInterfaceSize()

__inline VOID FxIrp::SetParameterQueryInterfaceSize ( __in USHORT  Size)

Definition at line 1082 of file fxirpkm.hpp.

1085 {
1087 }
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128

Referenced by FxPkgPnp::QueryForD3ColdInterface().

◆ SetParameterQueryInterfaceType()

__inline VOID FxIrp::SetParameterQueryInterfaceType ( __in const GUID InterfaceType)

Definition at line 1063 of file fxirpkm.hpp.

1066 {
1067  this->GetNextIrpStackLocation()->
1068  Parameters.QueryInterface.InterfaceType = InterfaceType;
1069 }
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct _IO_STACK_LOCATION::@3729::@3755 QueryInterface
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461

Referenced by FxPkgPnp::QueryForD3ColdInterface().

◆ SetParameterQueryInterfaceVersion()

__inline VOID FxIrp::SetParameterQueryInterfaceVersion ( __in USHORT  Version)

Definition at line 1073 of file fxirpkm.hpp.

1076 {
1078 }
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128

Referenced by FxPkgPnp::QueryForD3ColdInterface().

◆ SetParameterUsageNotificationInPath()

__inline VOID FxIrp::SetParameterUsageNotificationInPath ( __in BOOLEAN  InPath)

Definition at line 821 of file fxirpum.cpp.

824 {
825  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
826 }
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

◆ SetStatus()

◆ SetSystemBuffer()

__inline VOID FxIrp::SetSystemBuffer ( __in PVOID  Value)

Definition at line 1313 of file fxirpum.cpp.

1316 {
1318 
1319  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1320 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoctlRequest(), FxIoTarget::FormatIoRequest(), and FxIoContext::ReleaseAndRestore().

◆ SetUserBuffer()

__inline VOID FxIrp::SetUserBuffer ( __in PVOID  Value)

Definition at line 1341 of file fxirpum.cpp.

1344 {
1346 
1347 
1348  FX_VERIFY(INTERNAL, TRAPMSG("To be implemented"));
1349 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))

Referenced by FxIoTarget::FormatIoctlRequest(), FxIoTarget::FormatIoRequest(), and FxIoContext::ReleaseAndRestore().

◆ SkipCurrentIrpStackLocation()

__inline VOID FxIrp::SkipCurrentIrpStackLocation ( VOID  )

Definition at line 400 of file fxirpum.cpp.

403 {
404  //
405  // Earler we always used to copy because the framework always set a
406  // completion routine to notify other packages that we completed. However,
407  // since some I/O paths relied on Skip to revert the action taken by
408  // SetNextStackLocation in failure paths, we now skip instead of copy. The
409  // same behavior applies to KMDF as well.
410  //
411  m_Irp->SkipCurrentIrpStackLocation();
412 }
MdIrp m_Irp
Definition: fxirp.hpp:33

Referenced by FxIoTarget::_RequestCancelled(), FxDefaultIrpHandler::Dispatch(), FxPkgIo::DispatchStep1(), FxIoTarget::DrainPendedRequestsLocked(), FxIoQueue::ForwardRequestToParent(), FxPkgGeneral::OnCleanup(), FxPkgGeneral::OnClose(), FxPkgGeneral::OnShutdown(), FxIoTarget::PendRequestLocked(), FxRequest::PreProcessSendAndForget(), and FxIoQueue::QueueDriverCreatedRequest().

◆ StartNextPowerIrp()

__inline VOID FxIrp::StartNextPowerIrp ( )

Definition at line 61 of file fxirpum.cpp.

63 {
64 
65 
66 
67  DO_NOTHING();
68 }
#define DO_NOTHING()
Definition: mxgeneral.h:32

Referenced by FxDefaultIrpHandler::Dispatch().

Friends And Related Function Documentation

◆ FxAutoIrp

friend struct FxAutoIrp
friend

Definition at line 30 of file fxirp.hpp.

Member Data Documentation

◆ m_Irp


The documentation for this class was generated from the following files: