Something went wrong. Try again.
Reactos
Something went wrong. Try again.
C++
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207/*++
Copyright (c) Microsoft Corporation
ModuleName:
MxDeviceObjectUm.cpp
Abstract:
User Mode implementation of Device Object defined in MxDeviceObject.h
--*/
#include "fxmin.hpp"
CCHARMxDeviceObject::GetStackSize( VOID ){ return (CCHAR) (static_cast<IWudfDevice2*>(m_DeviceObject))->GetStackSize2();}
VOIDMxDeviceObject::ReferenceObject( ){ m_DeviceObject->AddRef();
// // We take a reference on device stack object as it is the reference on // device stack object that keeps the driver loaded // m_DeviceObject->GetDeviceStackInterface()->AddRef();}
MdDeviceObjectMxDeviceObject::GetAttachedDeviceReference( VOID ){ FX_VERIFY(INTERNAL, TRAPMSG("MxDeviceObject::GetAttachedDeviceReference " "not implemented for UMDF")); return NULL;}
VOIDMxDeviceObject::DereferenceObject( ){ m_DeviceObject->Release();
// // We also take a device stack reference (see ReferenceObject) // release it now // m_DeviceObject->GetDeviceStackInterface()->Release();}
ULONGMxDeviceObject::GetFlags( VOID ){ return m_DeviceObject->GetDeviceObjectWdmFlags();}
POWER_STATEMxDeviceObject::SetPowerState( __in POWER_STATE_TYPE /*Type*/, __in POWER_STATE State ){ ULONG oldState; POWER_STATE oldStateEnum;
m_DeviceObject->GetDeviceStackInterface()->SetPowerState( State.DeviceState, &oldState );
oldStateEnum.DeviceState = (DEVICE_POWER_STATE) oldState;
return oldStateEnum;}
VOIDMxDeviceObject::InvalidateDeviceRelations( __in DEVICE_RELATION_TYPE Type ){ UNREFERENCED_PARAMETER(Type);
ASSERTMSG("Not implemented for UMDF\n", FALSE);
//IoInvalidateDeviceRelations(DeviceObject, Type);}
VOIDMxDeviceObject::InvalidateDeviceState( __in MdDeviceObject Fdo ){ // // DO NOT use m_DeviceObject. That specifies PDO in this case which is // currently NULL for UMDF. Use the passed in Fdo instead. // Fdo->GetDeviceStackInterface()->InvalidateDeviceState();}
PVOIDMxDeviceObject::GetDeviceExtension( VOID ){ ASSERTMSG("Not implemented for UMDF\n", FALSE); return NULL;}
VOIDMxDeviceObject::SetDeviceExtension( PVOID Value ){ // // This will set the context // (static_cast<IWudfDevice2*>(m_DeviceObject))->SetContext(Value);}
DEVICE_TYPEMxDeviceObject::GetDeviceType( VOID ){ ASSERTMSG("Not implemented for UMDF\n", FALSE); return (DEVICE_TYPE) 0;}
ULONGMxDeviceObject::GetCharacteristics( VOID ){ ASSERTMSG("Not implemented for UMDF\n", FALSE); return 0;}
VOIDMxDeviceObject::SetDeviceType( DEVICE_TYPE /* Value */ ){ ASSERTMSG("Not implemented for UMDF\n", FALSE);}
VOIDMxDeviceObject::SetCharacteristics( ULONG /* Characteristics */ ){ ASSERTMSG("Not implemented for UMDF\n", FALSE);}
VOIDMxDeviceObject::SetAlignmentRequirement( _In_ ULONG /* Value */ ){ ASSERTMSG("Not implemented for UMDF\n", FALSE);}
ULONGMxDeviceObject::GetAlignmentRequirement( VOID ){ ASSERTMSG("Not implemented for UMDF\n", FALSE); return 0;}
VOIDMxDeviceObject::SetStackSize( _In_ CCHAR Size ){ (static_cast<IWudfDevice2*>(m_DeviceObject))->SetStackSize2((ULONG)Size);}
VOIDMxDeviceObject::SetFlags( ULONG Flags ){ UNREFERENCED_PARAMETER(Flags);
}