ReactOS  0.4.15-dev-2965-g9a42267
fxdevicefdoapi.cpp File Reference
#include "fxcorepch.hpp"
Include dependency graph for fxdevicefdoapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (DISPATCH_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfFdoAddStaticChild)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
 
 if (pFdo->IsLegacy()||pFdo->IsFdo()==FALSE)
 
 FxObjectHandleGetPtr (GetFxDriverGlobals(DriverGlobals), Child, FX_TYPE_DEVICE,(PVOID *)&pPdo)
 
 if (pPdo->IsLegacy()||pPdo->IsPdo()==FALSE)
 
 if (NT_SUCCESS(status))
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pDevice, &pFxDriverGlobals)
 
 if (pDevice->IsLegacy()||(pDevice->IsFdo()==FALSE))
 
 if (Flags==0||(Flags &~WdfRetrieveAllChildren) !=0)
 
_Must_inspect_result_ __drv_maxIRQL (PASSIVE_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfFdoQueryForInterface)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE_BASE,(PVOID *)&pDeviceBase, &pFxDriverGlobals)
 
 FxPointerNotNull (pFxDriverGlobals, InterfaceType)
 
 FxPointerNotNull (pFxDriverGlobals, Interface)
 
 if (!NT_SUCCESS(status))
 
 if (NT_SUCCESS(pDeviceBase->QueryInterface(&params)))
 
return pDeviceBase QueryForInterface (InterfaceType, Interface, Size, Version, InterfaceSpecificData)
 
 if (pPkgFdo->m_DefaultDeviceList !=NULL)
 

Variables

_Must_inspect_result_ __in WDFDEVICE Fdo
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE Child
 
FxDevicepFdo
 
FxDevicepPdo
 
FxPkgFdopPkgFdo = pFdo->GetFdoPkg()
 
NTSTATUS status = pPkgFdo->m_StaticDeviceList->Add(&description.Header, NULL, NULL)
 
description Header IdentificationDescriptionSize = sizeof(description)
 
description Pdo = pPdo
 
WDF_CHILD_LIST_ITERATOR iterator
 
FxDevicepDevice = NULL
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE PreviousChild
 
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE __in ULONG Flags
 
WDFDEVICE next = pPkgFdo->m_StaticDeviceList->GetNextStaticDevice(PreviousChild, Flags)
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID InterfaceType
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE Interface
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT Size
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT __in USHORT Version
 
_Must_inspect_result_ __in WDFDEVICE __in LPCGUID __out PINTERFACE __in USHORT __in USHORT __in_opt PVOID InterfaceSpecificData
 
FxDeviceBasepDeviceBase
 
FxQueryInterfaceParams params = { (PVOID*) &pDevice, FX_TYPE_DEVICE, 0 }
 
 else
 
return NULL
 

Function Documentation

◆ __drv_maxIRQL() [1/2]

◆ __drv_maxIRQL() [2/2]

_Must_inspect_result_ __drv_maxIRQL ( PASSIVE_LEVEL  )

◆ FxObjectHandleGetPtr() [1/2]

◆ FxObjectHandleGetPtr() [2/2]

FxObjectHandleGetPtr ( GetFxDriverGlobals(DriverGlobals ,
Child  ,
FX_TYPE_DEVICE  ,
(PVOID *)&  pPdo 
)

◆ FxObjectHandleGetPtrAndGlobals() [1/2]

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Fdo  ,
FX_TYPE_DEVICE  ,
(PVOID *)&  pDevice,
pFxDriverGlobals 
)

◆ FxObjectHandleGetPtrAndGlobals() [2/2]

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Fdo  ,
FX_TYPE_DEVICE_BASE  ,
(PVOID *)&  pDeviceBase,
pFxDriverGlobals 
)

◆ FxPointerNotNull() [1/2]

FxPointerNotNull ( pFxDriverGlobals  ,
InterfaceType   
)

◆ FxPointerNotNull() [2/2]

FxPointerNotNull ( pFxDriverGlobals  ,
Interface   
)

◆ if() [1/8]

if ( pFdo->  IsLegacy)||pFdo->IsFdo( = FALSE)

Definition at line 78 of file fxdevicefdoapi.cpp.

78  {
80 
83  "WDFDEVICE 0x%p is either legacy or is not a Fdo, %!STATUS!",
84  Fdo, status);
85 
86  return status;
87  }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define TRACINGDEVICE
Definition: dbgtrace.h:58
FxDevice * pFdo
NTSTATUS status
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
_Must_inspect_result_ __in WDFDEVICE Fdo
Definition: ps.c:97

◆ if() [2/8]

if ( pPdo->  IsLegacy)||pPdo->IsPdo( = FALSE)

Definition at line 94 of file fxdevicefdoapi.cpp.

94  {
96 
99  "WDFDEVICE Child 0x%p is either legacy or is not a PDO, %!STATUS!",
100  Child, status);
101 
102  return status;
103  }
_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE Child
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define TRACINGDEVICE
Definition: dbgtrace.h:58
FxDevice * pFdo
NTSTATUS status
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
Definition: ps.c:97

◆ if() [3/8]

if ( NT_SUCCESS(status )

Definition at line 116 of file fxdevicefdoapi.cpp.

116  {
118  }
virtual VOID SetDeviceTelemetryInfoFlags(_In_ FxDeviceInfoFlags Flag)
Definition: fxdevice.hpp:1807
FxDevice * pFdo

◆ if() [4/8]

if ( pDevice->  IsLegacy)||(pDevice->IsFdo()==FALSE)

Definition at line 162 of file fxdevicefdoapi.cpp.

162  {
165  "Invalid WDFDEVICE %p is not an FDO", Fdo);
167  return;
168  }
#define TRACINGDEVICE
Definition: dbgtrace.h:58
PFX_DRIVER_GLOBALS pFxDriverGlobals
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)

◆ if() [5/8]

if ( Flags  = = 0 || (Flags & ~WdfRetrieveAllChildren) != 0)

Definition at line 234 of file fxdevicefdoapi.cpp.

234  {
237  "Invalid Flags 0x%x", Flags);
239  return NULL;
240  }
#define TRACINGDEVICE
Definition: dbgtrace.h:58
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
PFX_DRIVER_GLOBALS pFxDriverGlobals
return NULL
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)

◆ if() [6/8]

if ( NT_SUCCESSstatus)

Definition at line 378 of file fxdevicefdoapi.cpp.

378  {
379  return status;
380  }
NTSTATUS status

◆ if() [7/8]

Definition at line 385 of file fxdevicefdoapi.cpp.

385  {
386  //
387  // Verify type
388  //
389  if (pDevice->IsLegacy() || (pDevice->IsFdo() == FALSE)) {
391 
394  "WDFDEVICE 0x%p Device is either legacy or is not a Fdo %!STATUS!",
395  Fdo, status);
396 
397  return status;
398  }
399  }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
__inline BOOLEAN IsLegacy(VOID)
Definition: fxdevice.hpp:1209
#define FALSE
Definition: types.h:117
__inline BOOLEAN IsFdo(VOID)
Definition: fxdevice.hpp:1227
#define TRACINGDEVICE
Definition: dbgtrace.h:58
PFX_DRIVER_GLOBALS pFxDriverGlobals
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461
NTSTATUS status
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
FxDevice * pDevice
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
Definition: ps.c:97

◆ if() [8/8]

if ( pPkgFdo->m_DefaultDeviceList !  = NULL)

Definition at line 458 of file fxdevicefdoapi.cpp.

458  {
459  return (WDFCHILDLIST) pPkgFdo->m_DefaultDeviceList->GetObjectHandle();
460  }
FxChildList * m_DefaultDeviceList
Definition: fxpkgfdo.hpp:40
FxPkgFdo * pPkgFdo
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603

◆ QueryForInterface()

return pDeviceBase QueryForInterface ( InterfaceType  ,
Interface  ,
Size  ,
Version  ,
InterfaceSpecificData   
)

Variable Documentation

◆ Child

_Must_inspect_result_ __in WDFDEVICE __in WDFDEVICE Child
Initial value:

Definition at line 63 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ else

else
Initial value:
{
#define DO_NOTHING()
Definition: mxgeneral.h:32

Definition at line 400 of file fxdevicefdoapi.cpp.

◆ Fdo

__in WDFDEVICE Fdo
Initial value:

Definition at line 44 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ Flags

Initial value:

Definition at line 219 of file fxdevicefdoapi.cpp.

◆ IdentificationDescriptionSize

◆ Interface

◆ InterfaceSpecificData

◆ InterfaceType

◆ iterator

pPkgFdo m_StaticDeviceList EndIteration & iterator

Definition at line 149 of file fxdevicefdoapi.cpp.

Referenced by __insert_grouping_aux(), deque< IncompleteClass >::_M_fill_initialize(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::_M_insert(), hashtable< _Value, _Value, _HashFcn, _UnorderedMultisetTraits, _STLP_PRIV _Identity< _Value >, _EqualKey, _Alloc >::_M_insert_noresize(), AddDlg_OnInitDialog(), AdjTest::adjfind1(), AdjTest::adjfind2(), AdvanceTest::adv(), ListTest::allocator_with_state(), SlistTest::allocator_with_state(), VectorTest::auto_ref(), slist< value_type, _All >::before_begin(), list< BookmarkNode >::begin(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::begin(), slist< value_type, _All >::begin(), CountUniqueItems_Aux(), MoveConstructorTest::deque_test(), do_insert_range(), EditDlg_OnInitDialog(), list< BookmarkNode >::end(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::end(), slist< value_type, _All >::end(), MapTest::equal_range(), UnorderedTest::equal_range(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::equal_range(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::equal_range_unique(), list< BookmarkNode >::erase(), slist< value_type, _All >::erase(), deque< IncompleteClass >::erase(), slist< value_type, _All >::erase_after(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::erase_unique(), IconCache::extract(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::find(), FindTest::findif1(), FT_List_Iterate(), get_algid_info(), HashTest::hmap1(), HashTest::hmmap1(), HashTest::hmset1(), HashTest::hset2(), slist< value_type, _All >::insert(), basic_string< char, char_traits< char >, allocator< char > >::insert(), slist< value_type, _All >::insert_after(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::insert_equal(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::insert_unique(), hashtable< _Value, _Value, _HashFcn, _UnorderedMultisetTraits, _STLP_PRIV _Identity< _Value >, _EqualKey, _Alloc >::insert_unique_noresize(), inserter(), IterTest::iter1(), MapTest::iterators(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::lower_bound(), main(), MapTest::mmap1(), MapTest::mmap2(), operator delete(), test_slist_sort::operator()(), test_list_sort::operator()(), test_insert_one< C >::operator()(), test_insert_n< C >::operator()(), tmdump::state_link::operator()(), FileTypeManager::operator[](), slist< value_type, _All >::previous(), PrintBugreport(), NotifyArea::read_config(), XMLStorage::XMLNode::remove_children(), DriveVolume::RemoveDBFile(), SSOThread::Run(), SearchTest::search1(), UnorderedTest::umap(), UnorderedTest::umultimap(), UnorderedTest::umultiset(), UpdateDefragInfo(), UpdateFromEvent(), _Rb_tree< key_type, key_compare, value_type, _STLP_SELECT1ST(value_type, void), _MapTraits, _Alloc >::upper_bound(), UnorderedTest::user_case(), VectorTest::vec_test_1(), MoveConstructorTest::vector_test(), and WriteGeneric().

◆ next

return next = pPkgFdo->m_StaticDeviceList->GetNextStaticDevice(PreviousChild, Flags)

Definition at line 223 of file fxdevicefdoapi.cpp.

◆ NULL

return NULL

Definition at line 466 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ params

Definition at line 363 of file fxdevicefdoapi.cpp.

◆ pDevice

FxDevice* pDevice = NULL

Definition at line 150 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ pDeviceBase

FxDeviceBase * pDeviceBase

◆ Pdo

Definition at line 112 of file fxdevicefdoapi.cpp.

◆ pFdo

FxDevice* pFdo

Definition at line 65 of file fxdevicefdoapi.cpp.

Referenced by AddDeviceInternal(), if(), and SerialAddDeviceInternal().

◆ pPdo

◆ pPkgFdo

FxPkgFdo * pPkgFdo = pFdo->GetFdoPkg()

Definition at line 67 of file fxdevicefdoapi.cpp.

Referenced by FxPkgFdo::_PnpFilteredStartDeviceCompletionRoutine(), and if().

◆ PreviousChild

Definition at line 189 of file fxdevicefdoapi.cpp.

◆ Size

◆ status

status = pPkgFdo->m_StaticDeviceList->Add(&description.Header, NULL, NULL)

Definition at line 68 of file fxdevicefdoapi.cpp.

Referenced by if().

◆ Version