1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 Module Name: 6 7 FxDeviceInterface.hpp 8 9 Abstract: 10 11 This module implements the device interface object. 12 13 Author: 14 15 16 17 Environment: 18 19 Both kernel and user mode 20 21 Revision History: 22 23 --*/ 24 25 #ifndef _FXDEVICEINTERFACE_H_ 26 #define _FXDEVICEINTERFACE_H_ 27 28 class FxDeviceInterface : public FxStump 29 { 30 public: 31 GUID m_InterfaceClassGUID; 32 33 UNICODE_STRING m_ReferenceString; 34 35 UNICODE_STRING m_SymbolicLinkName; 36 37 SINGLE_LIST_ENTRY m_Entry; 38 39 BOOLEAN m_State; 40 41 #if (FX_CORE_MODE == FX_CORE_USER_MODE) 42 // 43 // This is needed in UM to get hold of host interface 44 // 45 MdDeviceObject m_Device; 46 47 #endif 48 49 public: 50 FxDeviceInterface( 51 VOID 52 ); 53 54 ~FxDeviceInterface( 55 VOID 56 ); 57 58 static 59 FxDeviceInterface* 60 _FromEntry( 61 __in PSINGLE_LIST_ENTRY Entry 62 ) 63 { 64 return CONTAINING_RECORD(Entry, FxDeviceInterface, m_Entry); 65 } 66 67 _Must_inspect_result_ 68 NTSTATUS 69 Initialize( 70 __in PFX_DRIVER_GLOBALS FxDriverGlobals, 71 __in CONST GUID* InterfaceGUID, 72 __in_opt PCUNICODE_STRING ReferenceString 73 ); 74 75 VOID 76 SetState( 77 __in BOOLEAN State 78 ); 79 80 _Must_inspect_result_ 81 NTSTATUS 82 Register( 83 __in MdDeviceObject Pdo 84 ); 85 86 _Must_inspect_result_ 87 NTSTATUS 88 Register( 89 _In_ FxDevice* Device 90 ); 91 92 NTSTATUS 93 GetSymbolicLinkName( 94 _In_ FxString* LinkString 95 ); 96 }; 97 98 #endif // _FXDEVICEINTERFACE_H_ 99