1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 ModuleName: 6 7 MxDeviceObjectUm.cpp 8 9 Abstract: 10 11 User Mode implementation of Device Object defined in MxDeviceObject.h 12 13 --*/ 14 15 #include "fxmin.hpp" 16 #include "fxldrum.h" 17 18 PDRIVER_ADD_DEVICE 19 MxDriverObject::GetDriverExtensionAddDevice( 20 VOID 21 ) 22 { 23 return m_DriverObject->AddDevice; 24 } 25 26 VOID 27 MxDriverObject::SetDriverExtensionAddDevice( 28 _In_ MdDriverAddDevice Value 29 ) 30 { 31 m_DriverObject->AddDevice = Value; 32 } 33 34 MdDriverUnload 35 MxDriverObject::GetDriverUnload( 36 VOID 37 ) 38 { 39 m_DriverObject->DriverUnload; 40 return NULL; 41 } 42 43 VOID 44 MxDriverObject::SetDriverUnload( 45 _In_ MdDriverUnload Value 46 ) 47 { 48 m_DriverObject->DriverUnload = Value; 49 } 50 51 VOID 52 MxDriverObject::SetMajorFunction( 53 _In_ UCHAR i, 54 _In_ MdDriverDispatch Value 55 ) 56 { 57 m_DriverObject->MajorFunction[i] = Value; 58 } 59 60 VOID 61 MxDriverObject::SetDriverObjectFlag( 62 _In_ FxDriverObjectUmFlags Flag 63 ) 64 { 65 m_DriverObject->Flags |= Flag; 66 } 67 68 BOOLEAN 69 MxDriverObject::IsDriverObjectFlagSet( 70 _In_ FxDriverObjectUmFlags Flag 71 ) 72 { 73 return (!!(m_DriverObject->Flags & Flag)); 74 } 75 76