1 /*++ 2 3 Copyright (c) Microsoft Corporation. All rights reserved. 4 5 _WdfVersionBuild_ 6 7 Module Name: 8 9 WdfString.h 10 11 Abstract: 12 13 This is the DDI for string handles. 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 _WDFSTRING_H_ 30 #define _WDFSTRING_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: WdfStringCreate 54 // 55 typedef 56 _Must_inspect_result_ 57 _IRQL_requires_max_(PASSIVE_LEVEL) 58 WDFAPI 59 NTSTATUS 60 (STDCALL *PFN_WDFSTRINGCREATE)( 61 _In_ 62 PWDF_DRIVER_GLOBALS DriverGlobals, 63 _In_opt_ 64 PCUNICODE_STRING UnicodeString, 65 _In_opt_ 66 PWDF_OBJECT_ATTRIBUTES StringAttributes, 67 _Out_ 68 WDFSTRING* String 69 ); 70 71 _Must_inspect_result_ 72 _IRQL_requires_max_(PASSIVE_LEVEL) 73 FORCEINLINE 74 NTSTATUS 75 WdfStringCreate( 76 _In_opt_ 77 PCUNICODE_STRING UnicodeString, 78 _In_opt_ 79 PWDF_OBJECT_ATTRIBUTES StringAttributes, 80 _Out_ 81 WDFSTRING* String 82 ) 83 { 84 return ((PFN_WDFSTRINGCREATE) WdfFunctions[WdfStringCreateTableIndex])(WdfDriverGlobals, UnicodeString, StringAttributes, String); 85 } 86 87 // 88 // WDF Function: WdfStringGetUnicodeString 89 // 90 typedef 91 _IRQL_requires_max_(PASSIVE_LEVEL) 92 WDFAPI 93 VOID 94 (STDCALL *PFN_WDFSTRINGGETUNICODESTRING)( 95 _In_ 96 PWDF_DRIVER_GLOBALS DriverGlobals, 97 _In_ 98 WDFSTRING String, 99 _Out_ 100 PUNICODE_STRING UnicodeString 101 ); 102 103 _IRQL_requires_max_(PASSIVE_LEVEL) 104 FORCEINLINE 105 VOID 106 WdfStringGetUnicodeString( 107 _In_ 108 WDFSTRING String, 109 _Out_ 110 PUNICODE_STRING UnicodeString 111 ) 112 { 113 ((PFN_WDFSTRINGGETUNICODESTRING) WdfFunctions[WdfStringGetUnicodeStringTableIndex])(WdfDriverGlobals, String, UnicodeString); 114 } 115 116 117 118 #endif // (NTDDI_VERSION >= NTDDI_WIN2K) 119 120 121 WDF_EXTERN_C_END 122 123 #endif // _WDFSTRING_H_ 124 125