ReactOS 0.4.15-dev-7842-g558ab78
fxcollectionapi.cpp File Reference
#include "fxsupportpch.hpp"
Include dependency graph for fxcollectionapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (DISPATCH_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfCollectionCreate)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 if (NT_SUCCESS(FxValidateObjectAttributesForParentHandle(pFxDriverGlobals, CollectionAttributes)))
 
 FxPointerNotNull (pFxDriverGlobals, Collection)
 
 if (!NT_SUCCESS(status))
 
 if (pCollection !=NULL)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *)&pCollection)
 
pCollection Unlock (irql)
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection, &pFxDriverGlobals)
 
 FxObjectHandleGetPtr (pFxDriverGlobals, Object, FX_TYPE_OBJECT,(PVOID *) &pObject)
 
 if (pEntry !=NULL)
 
 if (pObject !=NULL)
 
 FxObjectHandleGetPtr (pFxDriverGlobals, Item, FX_TYPE_OBJECT,(PVOID *) &pObject)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection)
 
 if (pObject==NULL)
 
return pObject GetObjectHandle ()
 

Variables

_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
 
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFCOLLECTION * Collection
 
PFX_DRIVER_GLOBALS pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals)
 
NTSTATUS status = FxValidateObjectAttributes(pFxDriverGlobals, CollectionAttributes)
 
FxCollectionpCollection
 
WDFCOLLECTION hCol
 
 else
 
KIRQL irql
 
ULONG count = pCollection->Count()
 
_Must_inspect_result_ __in WDFCOLLECTION __in WDFOBJECT Object
 
FxObjectpObject = pCollection->GetItem(Index)
 
__in WDFCOLLECTION __in ULONG Index
 
FxCollectionEntrypEntry = pCollection->FindEntry(Index)
 
__in WDFCOLLECTION __in WDFOBJECT Item
 

Function Documentation

◆ __drv_maxIRQL()

◆ FxObjectHandleGetPtr() [1/4]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *) &  pCollection 
)

◆ FxObjectHandleGetPtr() [2/4]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *)&  pCollection 
)

◆ FxObjectHandleGetPtr() [3/4]

FxObjectHandleGetPtr ( pFxDriverGlobals  ,
Item  ,
FX_TYPE_OBJECT  ,
(PVOID *) &  pObject 
)

◆ FxObjectHandleGetPtr() [4/4]

FxObjectHandleGetPtr ( pFxDriverGlobals  ,
Object  ,
FX_TYPE_OBJECT  ,
(PVOID *) &  pObject 
)

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Collection  ,
FX_TYPE_COLLECTION  ,
(PVOID *) &  pCollection,
pFxDriverGlobals 
)

Referenced by if().

◆ FxPointerNotNull()

FxPointerNotNull ( pFxDriverGlobals  ,
Collection   
)

◆ GetObjectHandle()

return pObject GetObjectHandle ( )

Referenced by __drv_requiresIRQL(), _Releases_lock_(), FxResourceCollection::AddAt(), FxCommonBuffer::AllocateCommonBuffer(), FxObject::CallCleanupCallbacks(), FxDmaTransactionBase::CancelResourceAllocation(), FxIoQueue::CanThreadDispatchEventsLocked(), FxIoTargetRemote::ClearTargetPointers(), FxIoTargetRemote::Close(), FxIoTarget::CompleteCanceledRequest(), FxRequest::CompleteInternal(), FxIoQueue::ConfigureConstraints(), FxIoQueue::DispatchRequestToDriver(), FxDmaTransactionBase::Dispose(), FxDpc::DpcHandler(), FxIoTarget::DrainPendedRequestsLocked(), FxDmaTransactionBase::Execute(), FxRequest::GetDeviceControlOutputMemoryObject(), FxDmaTransactionBase::GetHandle(), FxChildList::GetHandle(), FxDeviceBase::GetHandle(), FxDriver::GetHandle(), FxFileObject::GetHandle(), FxInterrupt::GetHandle(), FxIoQueue::GetHandle(), FxIoTarget::GetHandle(), FxIoTargetRemote::GetHandle(), FxMemoryObject::GetHandle(), FxRequestBase::GetHandle(), FxCmResList::GetHandle(), FxIoResReqList::GetHandle(), FxIoResList::GetHandle(), FxTimer::GetHandle(), FxUsbInterface::GetHandle(), FxUsbPipe::GetHandle(), FxUserObject::GetHandle(), FxWmiInstance::GetHandle(), FxWmiProvider::GetHandle(), FxWorkItem::GetHandle(), FxDmaEnabler::GetHandle(), FxRequest::GetMemoryObject(), FxIoQueue::GetRequest(), FxIoTargetRemote::GetTargetDeviceRelations(), FxRequestBase::GetTraceObjectHandle(), FxDmaTransactionBase::GetTransferInfo(), FxIoTarget::GotoPurgeState(), FxIoTarget::GotoRemoveState(), FxIoTarget::GotoStartState(), FxIoTarget::GotoStopState(), FxIoTarget::HandleFailedResubmit(), if(), FxIoTarget::Init(), FxDmaTransactionBase::Initialize(), FxIoQueue::Initialize(), FxIoTargetRemote::Open(), FxIoTargetRemote::OpenTargetHandle(), FxIoQueue::PostRequestCompletedCallback(), FxIoQueue::PreRequestCompletedCallback(), FxIoTarget::PrintDisposeMessage(), FxRequest::ProbeAndLockForRead(), FxRequest::ProbeAndLockForWrite(), FxChildList::ProcessModificationsLocked(), FxIoQueue::QueueDrainSynchronously(), FxIoQueue::QueueIdle(), FxIoQueue::QueueIdleSynchronously(), FxIoQueue::QueuePurge(), FxIoQueue::QueuePurgeSynchronously(), FxIoQueue::QueueRequest(), FxIoQueue::QueueRequestFromForward(), FxIoQueue::ReadyNotify(), FxDmaPacketTransaction::ReleaseAdapter(), FxDmaTransactionBase::ReleaseForReuse(), FxResourceCollection::RemoveAndDelete(), FxIoTarget::RemoveCompletedRequestLocked(), FxIoQueue::RequestCompletedCallback(), FxIoTarget::RequestCompletionRoutine(), FxDmaPacketTransaction::ReserveAdapter(), FxUsbDevice::SelectConfigMulti(), FxIoTargetSelf::Send(), FxIoQueue::SetState(), FxIoQueue::StartPowerTransitionOff(), FxIoQueue::StopProcessingForPower(), FxDmaSystemTransaction::StopTransfer(), FxIoTarget::SubmitLocked(), FxIoTarget::SubmitSync(), FxIoTarget::TimerCallback(), and FxIoTarget::WaitForDisposeEvent().

◆ if() [1/6]

if ( NT_SUCCESSstatus)

Definition at line 76 of file fxcollectionapi.cpp.

76 {
77 return status;
78 }
NTSTATUS status

◆ if() [2/6]

Definition at line 60 of file fxcollectionapi.cpp.

61 {
63
67 (PVOID*)&pParent,
69 }
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Collection, FX_TYPE_COLLECTION,(PVOID *) &pCollection, &pFxDriverGlobals)
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES CollectionAttributes
PFX_DRIVER_GLOBALS pFxDriverGlobals
FxObject * pParent
Definition: fxdpcapi.cpp:86
@ FX_TYPE_OBJECT
Definition: fxtypes.h:45
WDFOBJECT ParentObject
Definition: wdfobject.h:130

◆ if() [3/6]

if ( pCollection = NULL)

Definition at line 83 of file fxcollectionapi.cpp.

83 {
85
86 if (NT_SUCCESS(status)) {
88 }
89 else {
91 "Could not create collection object: %!STATUS!",
92 status);
93
95 }
96 }
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
#define TRACINGERROR
Definition: dbgtrace.h:63
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
WDFCOLLECTION hCol
FxCollection * pCollection
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ WDFCOLLECTION Collection
Definition: wdfregistry.h:374

◆ if() [4/6]

if ( pEntry = NULL)

Definition at line 205 of file fxcollectionapi.cpp.

205 {
209 }
FxObject * m_Object
FxObject * pObject
FxCollectionEntry * pEntry
#define STATUS_SUCCESS
Definition: shellext.h:65
VOID CleanupEntry(__in FxCollectionEntry *Entry)

◆ if() [5/6]

if ( pObject = NULL)

Definition at line 217 of file fxcollectionapi.cpp.

217 {
219 }
VOID CleanupEntryObject(__in FxObject *Object)

◆ if() [6/6]

if ( pObject  = NULL)

Definition at line 316 of file fxcollectionapi.cpp.

316 {
317 return NULL;
318 }
#define NULL
Definition: types.h:112

◆ Unlock()

pCollection Unlock ( irql  )

Variable Documentation

◆ Collection

__in WDFCOLLECTION Collection
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 45 of file fxcollectionapi.cpp.

◆ CollectionAttributes

Definition at line 43 of file fxcollectionapi.cpp.

Referenced by if().

◆ count

Definition at line 121 of file fxcollectionapi.cpp.

◆ else

else
Initial value:
{
"Could not create collection object: "
"STATUS_INSUFFICIENT_RESOURCES" )

Definition at line 97 of file fxcollectionapi.cpp.

◆ hCol

WDFCOLLECTION hCol

Definition at line 53 of file fxcollectionapi.cpp.

Referenced by if().

◆ Index

__in WDFCOLLECTION __in ULONG Index
Initial value:

Definition at line 183 of file fxcollectionapi.cpp.

◆ irql

Definition at line 120 of file fxcollectionapi.cpp.

◆ Item

__in WDFCOLLECTION __in WDFOBJECT Item
Initial value:

Definition at line 239 of file fxcollectionapi.cpp.

◆ Object

Initial value:

Definition at line 145 of file fxcollectionapi.cpp.

◆ pCollection

FxCollection * pCollection
Initial value:

Definition at line 52 of file fxcollectionapi.cpp.

Referenced by if().

◆ pEntry

Definition at line 190 of file fxcollectionapi.cpp.

Referenced by if().

◆ pFxDriverGlobals

Definition at line 50 of file fxcollectionapi.cpp.

Referenced by if().

◆ pObject

pObject = pCollection->GetItem(Index)

Definition at line 152 of file fxcollectionapi.cpp.

Referenced by if().

◆ status