1 /*++ 2 3 Copyright (c) Microsoft Corporation. All rights reserved. 4 5 _WdfVersionBuild_ 6 7 Module Name: 8 9 wdfminiport.h 10 11 Abstract: 12 13 Interfaces for WDF usage in a miniport environment 14 15 Environment: 16 17 kernel mode only 18 19 Revision History: 20 21 --*/ 22 23 // 24 // NOTE: This header is generated by stubwork. Please make any 25 // modifications to the corresponding template files 26 // (.x or .y) and use stubwork to regenerate the header 27 // 28 29 #ifndef _WDFMINIPORT_H_ 30 #define _WDFMINIPORT_H_ 31 32 #ifndef WDF_EXTERN_C 33 #ifdef __cplusplus 34 #define WDF_EXTERN_C extern "C" 35 #define WDF_EXTERN_C_START extern "C" { 36 #define WDF_EXTERN_C_END } 37 #else 38 #define WDF_EXTERN_C 39 #define WDF_EXTERN_C_START 40 #define WDF_EXTERN_C_END 41 #endif 42 #endif 43 44 WDF_EXTERN_C_START 45 46 47 48 #if (NTDDI_VERSION >= NTDDI_WIN2K) 49 50 51 52 // 53 // WDF Function: WdfDeviceMiniportCreate 54 // 55 typedef 56 _Must_inspect_result_ 57 _IRQL_requires_max_(PASSIVE_LEVEL) 58 WDFAPI 59 NTSTATUS 60 (STDCALL *PFN_WDFDEVICEMINIPORTCREATE)( 61 _In_ 62 PWDF_DRIVER_GLOBALS DriverGlobals, 63 _In_ 64 WDFDRIVER Driver, 65 _In_opt_ 66 PWDF_OBJECT_ATTRIBUTES Attributes, 67 _In_ 68 PDEVICE_OBJECT DeviceObject, 69 _In_opt_ 70 PDEVICE_OBJECT AttachedDeviceObject, 71 _In_opt_ 72 PDEVICE_OBJECT Pdo, 73 _Out_ 74 WDFDEVICE* Device 75 ); 76 77 _Must_inspect_result_ 78 _IRQL_requires_max_(PASSIVE_LEVEL) 79 FORCEINLINE 80 NTSTATUS 81 WdfDeviceMiniportCreate( 82 _In_ 83 WDFDRIVER Driver, 84 _In_opt_ 85 PWDF_OBJECT_ATTRIBUTES Attributes, 86 _In_ 87 PDEVICE_OBJECT DeviceObject, 88 _In_opt_ 89 PDEVICE_OBJECT AttachedDeviceObject, 90 _In_opt_ 91 PDEVICE_OBJECT Pdo, 92 _Out_ 93 WDFDEVICE* Device 94 ) 95 { 96 return ((PFN_WDFDEVICEMINIPORTCREATE) WdfFunctions[WdfDeviceMiniportCreateTableIndex])(WdfDriverGlobals, Driver, Attributes, DeviceObject, AttachedDeviceObject, Pdo, Device); 97 } 98 99 // 100 // WDF Function: WdfDriverMiniportUnload 101 // 102 typedef 103 WDFAPI 104 VOID 105 (STDCALL *PFN_WDFDRIVERMINIPORTUNLOAD)( 106 _In_ 107 PWDF_DRIVER_GLOBALS DriverGlobals, 108 _In_ 109 WDFDRIVER Driver 110 ); 111 112 FORCEINLINE 113 VOID 114 WdfDriverMiniportUnload( 115 _In_ 116 WDFDRIVER Driver 117 ) 118 { 119 ((PFN_WDFDRIVERMINIPORTUNLOAD) WdfDriverMiniportUnloadOverride)(WdfDriverGlobals, Driver); 120 } 121 122 123 124 #endif // (NTDDI_VERSION >= NTDDI_WIN2K) 125 126 127 WDF_EXTERN_C_END 128 129 #endif // _WDFMINIPORT_H_ 130 131