ReactOS 0.4.15-dev-8428-g6910fa6
fxobjectapi.cpp File Reference
#include "fxobjectpch.hpp"
Include dependency graph for fxobjectapi.cpp:

Go to the source code of this file.

Functions

 __drv_maxIRQL (DISPATCH_LEVEL) WDFAPI VOID STDCALL WDFEXPORT(WdfObjectReferenceActual)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxPointerNotNull (GetFxDriverGlobals(DriverGlobals), Object)
 
FxCallbackLockFxGetCallbackLock (FxObject *Object)
 
__in _Requires_lock_not_held_ (_Curr_) _Acquires_lock_(_Curr_) WDFOBJECT Object)
 
__in _Requires_lock_held_ (_Curr_) _Releases_lock_(_Curr_) WDFOBJECT Object)
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Object, FX_TYPE_OBJECT,(PVOID *)&pObject, &pFxDriverGlobals)
 
 if (pObject->IsNoDeleteDDI())
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUID __in ULONG __out_bcount (QueryBufferLength) PVOID QueryBuffer)
 

Variables

__in WDFOBJECT Object
 
__in WDFOBJECT __in_opt PVOID Tag
 
__in WDFOBJECT __in_opt PVOID __in LONG Line
 
__in WDFOBJECT __in_opt PVOID __in LONG __in PSTR File
 
PFX_DRIVER_GLOBALS pFxDriverGlobals
 
FxObjectpObject
 
 else
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUIDGuid
 
_Must_inspect_result_ __in WDFOBJECT __in CONST GUID __in ULONG QueryBufferLength
 

Function Documentation

◆ __drv_maxIRQL()

__drv_maxIRQL ( DISPATCH_LEVEL  )

◆ __out_bcount()

Definition at line 340 of file fxobjectapi.cpp.

371{
372 DDI_ENTRY();
373
374 FxObject* p;
375
377 Object,
379 (PVOID*)&p);
380
382 Guid,
384 QueryBuffer);
385}
static _Must_inspect_result_ NTSTATUS _ObjectQuery(_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
Definition: fxobjectkm.cpp:39
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
DriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
@ FX_TYPE_OBJECT
Definition: fxtypes.h:45
GLfloat GLfloat p
Definition: glext.h:8902
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID _In_ ULONG QueryBufferLength
Definition: wdfobject.h:764

◆ _Requires_lock_held_()

__in _Requires_lock_held_ ( _Curr_  )

Definition at line 240 of file fxobjectapi.cpp.

244{
245 DDI_ENTRY();
246
250
252 Object,
254 (PVOID*)&pObject,
256
257 //
258 // If Lock Verifier on, validate whether its correct to
259 // make this call
260 //
262 //
263 // Check IRQL Level, etc.
264 //
265 }
266
267 //
268 // Get the CallbackLock for the object
269 //
271 if (pLock == NULL) {
273 "Invalid to call on WDFOBJECT 0x%p",Object);
279 );
280 return;
281 }
282
283 pLock->Unlock(pLock->m_PreviousIrql);
284
285 return;
286}
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
#define TRACINGDEVICE
Definition: dbgtrace.h:58
#define NULL
Definition: types.h:112
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Object, FX_TYPE_OBJECT,(PVOID *)&pObject, &pFxDriverGlobals)
FxCallbackLock * FxGetCallbackLock(FxObject *Object)
FxObject * pObject
PFX_DRIVER_GLOBALS pFxDriverGlobals
FxSpinLock * pLock
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
BOOLEAN FxVerifierLock
Definition: fxglobals.h:451
uint32_t ULONG_PTR
Definition: typedefs.h:65
@ WDF_INVALID_LOCK_OPERATION
Definition: wdfbugcodes.h:68

◆ _Requires_lock_not_held_()

__in _Requires_lock_not_held_ ( _Curr_  )

Definition at line 180 of file fxobjectapi.cpp.

184{
185 DDI_ENTRY();
186
190 KIRQL irql;
191
193 Object,
195 (PVOID*)&pObject,
197
198 //
199 // If Lock Verifier on, validate whether its correct to
200 // make this call
201 //
203 //
204 // Check IRQL Level, etc.
205 //
206 }
207
208 //
209 // Get the CallbackLock for the object
210 //
212
213 if (pLock == NULL) {
215 "Invalid to call on WDFOBJECT 0x%p", Object);
221 );
222 return;
223 }
224
225 pLock->Lock(&irql);
226 pLock->m_PreviousIrql = irql;
227
228 return;
229}
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591

◆ FxGetCallbackLock()

FxCallbackLock * FxGetCallbackLock ( FxObject Object)

Definition at line 129 of file fxobjectapi.cpp.

153{
155 IFxHasCallbacks* ihcb;
157
158 ihcb = NULL;
159
160 //
161 // Query the object for the IFxHasCallbacks interface. Objects that
162 // have callback locks must support this interface.
163 //
164 status = Object->QueryInterface(&params);
165 if (!NT_SUCCESS(status)) {
166 return NULL;
167 }
168
169 return ihcb->GetCallbackLockPtr(NULL);
170}
LONG NTSTATUS
Definition: precomp.h:26
virtual _Must_inspect_result_ FxCallbackLock * GetCallbackLockPtr(__out_opt FxObject **LockObject)=0
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
@ FX_TYPE_IHASCALLBACKS
Definition: fxtypes.h:114
GLenum const GLfloat * params
Definition: glext.h:5645
Definition: ps.c:97

Referenced by _Requires_lock_held_(), and _Requires_lock_not_held_().

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Object  ,
FX_TYPE_OBJECT  ,
(PVOID *)&  pObject,
pFxDriverGlobals 
)

◆ FxPointerNotNull()

FxPointerNotNull ( GetFxDriverGlobals(DriverGlobals ,
Object   
)

◆ if()

if ( pObject->  IsNoDeleteDDI())

Definition at line 313 of file fxobjectapi.cpp.

313 {
316 "Attempt to Delete an Object Which does not allow WdfDeleteObject "
317 "Handle 0x%p, %!STATUS!",
320 }
#define STATUS_CANNOT_DELETE
Definition: shellext.h:71

Variable Documentation

◆ else

else
Initial value:
{
virtual VOID DeleteObject(VOID)

Definition at line 321 of file fxobjectapi.cpp.

◆ File

Initial value:

Definition at line 50 of file fxobjectapi.cpp.

◆ Guid

◆ Line

Definition at line 48 of file fxobjectapi.cpp.

◆ Object

Initial value:

Definition at line 44 of file fxobjectapi.cpp.

◆ pFxDriverGlobals

PFX_DRIVER_GLOBALS pFxDriverGlobals

Definition at line 301 of file fxobjectapi.cpp.

Referenced by _Requires_lock_held_(), _Requires_lock_not_held_(), and if().

◆ pObject

FxResourceCm * pObject

Definition at line 302 of file fxobjectapi.cpp.

Referenced by FxSystemWorkItem::_Create(), FxUserObject::_Create(), FxDisposeList::_Create(), FxObject::_DereferenceActual(), FxObject::_ReferenceActual(), _Requires_lock_held_(), _Requires_lock_not_held_(), CUIFObjectArray::Add(), ATL::CAtlWinModule::AddCreateWndData(), AlignedFree(), ATL::AtlWinModuleAddCreateWndData(), CBDADeviceControl_fnConstructor(), CBDAPinControl_fnConstructor(), ATL::CContainedWindowT< TBase, TWinTraits >::CContainedWindowT(), client_free_handle(), client_get_handle(), copy_handle(), CoSwitchCallContext(), CKsProxy::CreateClockInstance(), CRYPT_CacheURL(), CRYPT_CreateAny(), CRYPT_CreateBlob(), CRYPT_CreateCert(), CRYPT_CreateContext(), CRYPT_CreateCRL(), CRYPT_CreateCTL(), CRYPT_CreatePKCS7(), CRYPT_DownloadObject(), CRYPT_FreeBlob(), CRYPT_GetObjectFromCache(), CRYPT_GetObjectFromFile(), DdAllocateObject(), DdFreeObject(), DdHmgAlloc(), DECLARE_INTERFACE_(), destroy_hash(), destroy_key(), FxDisposeList::DrainListLocked(), DRIVEROBJ_vCleanup(), File_RetrieveEncodedObjectW(), CUIFBalloonWindow::FindUIObject(), FxDpc::FlushAndRundown(), FxWorkItem::FlushAndRundown(), FxInterrupt::FlushAndRundown(), FxTimer::FlushAndRundown(), FTP_RetrieveEncodedObjectW(), FxObjectHandleGetGlobals(), FxObjectHandleGetPtr(), FxObjectHandleGetPtrOffset(), FxCmResList::GetDescriptor(), HTTP_RetrieveEncodedObjectW(), IWICStreamImpl_InitializeFromIStreamRegion(), IWICStreamImpl_InitializeFromMemory(), CKsAllocator::KsCreateAllocatorAndGetHandle(), NdrMesTypeDecode2(), NdrMesTypeEncode2(), NdrMesTypeFree2(), new_object(), NtGdiCreateClientObj(), CUIFObject::ObjectFromPoint(), PerfEvtDeviceD0EntryStart(), PerfEvtDeviceD0ExitStart(), PerfEvtDevicePrepareHardwareStart(), PerfEvtDeviceReleaseHardwareStart(), PerfEvtIoStopStart(), PerfEvtIoStopStop(), PerfIoComplete(), PerfIoStart(), PerformanceAnalysisPowerProcess(), PerformanceGetDriverDeviceAdd(), release_handle(), CUIFObjectArray::Remove(), FxResourceCollection::RemoveAndDelete(), RxFreeObject(), CKsProxy::SetPinState(), CKsProxy::SetSyncSource(), STDMETHODIMP_(), stream_initialize_from_filehandle(), StreamImpl_Create(), test_default_handler(), test_handler_marshaling(), test_inproc_handler(), test_OleCreate(), test_OleLoad(), Test_OneParamRoutine_MapDesktopObject(), test_ROT_multiple_entries(), VfAddContextToHandle(), VfWdfObjectGetTypedContext(), WdfCxVerifierKeBugCheck(), and CUIFWindow::~CUIFWindow().

◆ QueryBufferLength

◆ Tag

Definition at line 46 of file fxobjectapi.cpp.