140462c92SVictor Perevertkin /*++
240462c92SVictor Perevertkin
340462c92SVictor Perevertkin Copyright (c) Microsoft Corporation. All rights reserved.
440462c92SVictor Perevertkin
540462c92SVictor Perevertkin _WdfVersionBuild_
640462c92SVictor Perevertkin
740462c92SVictor Perevertkin Module Name:
840462c92SVictor Perevertkin
940462c92SVictor Perevertkin WdfString.h
1040462c92SVictor Perevertkin
1140462c92SVictor Perevertkin Abstract:
1240462c92SVictor Perevertkin
1340462c92SVictor Perevertkin This is the DDI for string handles.
1440462c92SVictor Perevertkin
1540462c92SVictor Perevertkin Environment:
1640462c92SVictor Perevertkin
1740462c92SVictor Perevertkin kernel mode only
1840462c92SVictor Perevertkin
1940462c92SVictor Perevertkin Revision History:
2040462c92SVictor Perevertkin
2140462c92SVictor Perevertkin --*/
2240462c92SVictor Perevertkin
2340462c92SVictor Perevertkin //
2440462c92SVictor Perevertkin // NOTE: This header is generated by stubwork. Please make any
2540462c92SVictor Perevertkin // modifications to the corresponding template files
2640462c92SVictor Perevertkin // (.x or .y) and use stubwork to regenerate the header
2740462c92SVictor Perevertkin //
2840462c92SVictor Perevertkin
2940462c92SVictor Perevertkin #ifndef _WDFSTRING_H_
3040462c92SVictor Perevertkin #define _WDFSTRING_H_
3140462c92SVictor Perevertkin
3240462c92SVictor Perevertkin #ifndef WDF_EXTERN_C
3340462c92SVictor Perevertkin #ifdef __cplusplus
3440462c92SVictor Perevertkin #define WDF_EXTERN_C extern "C"
3540462c92SVictor Perevertkin #define WDF_EXTERN_C_START extern "C" {
3640462c92SVictor Perevertkin #define WDF_EXTERN_C_END }
3740462c92SVictor Perevertkin #else
3840462c92SVictor Perevertkin #define WDF_EXTERN_C
3940462c92SVictor Perevertkin #define WDF_EXTERN_C_START
4040462c92SVictor Perevertkin #define WDF_EXTERN_C_END
4140462c92SVictor Perevertkin #endif
4240462c92SVictor Perevertkin #endif
4340462c92SVictor Perevertkin
4440462c92SVictor Perevertkin WDF_EXTERN_C_START
4540462c92SVictor Perevertkin
4640462c92SVictor Perevertkin
4740462c92SVictor Perevertkin
4840462c92SVictor Perevertkin #if (NTDDI_VERSION >= NTDDI_WIN2K)
4940462c92SVictor Perevertkin
5040462c92SVictor Perevertkin
5140462c92SVictor Perevertkin
5240462c92SVictor Perevertkin //
5340462c92SVictor Perevertkin // WDF Function: WdfStringCreate
5440462c92SVictor Perevertkin //
5540462c92SVictor Perevertkin typedef
5640462c92SVictor Perevertkin _Must_inspect_result_
5740462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL)
5840462c92SVictor Perevertkin WDFAPI
5940462c92SVictor Perevertkin NTSTATUS
60*545df815SVictor Perevertkin (STDCALL *PFN_WDFSTRINGCREATE)(
6140462c92SVictor Perevertkin _In_
6240462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals,
6340462c92SVictor Perevertkin _In_opt_
6440462c92SVictor Perevertkin PCUNICODE_STRING UnicodeString,
6540462c92SVictor Perevertkin _In_opt_
6640462c92SVictor Perevertkin PWDF_OBJECT_ATTRIBUTES StringAttributes,
6740462c92SVictor Perevertkin _Out_
6840462c92SVictor Perevertkin WDFSTRING* String
6940462c92SVictor Perevertkin );
7040462c92SVictor Perevertkin
7140462c92SVictor Perevertkin _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)7240462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL)
7340462c92SVictor Perevertkin FORCEINLINE
74*545df815SVictor Perevertkin NTSTATUS
7540462c92SVictor Perevertkin WdfStringCreate(
7640462c92SVictor Perevertkin _In_opt_
7740462c92SVictor Perevertkin PCUNICODE_STRING UnicodeString,
7840462c92SVictor Perevertkin _In_opt_
7940462c92SVictor Perevertkin PWDF_OBJECT_ATTRIBUTES StringAttributes,
8040462c92SVictor Perevertkin _Out_
8140462c92SVictor Perevertkin WDFSTRING* String
8240462c92SVictor Perevertkin )
8340462c92SVictor Perevertkin {
8440462c92SVictor Perevertkin return ((PFN_WDFSTRINGCREATE) WdfFunctions[WdfStringCreateTableIndex])(WdfDriverGlobals, UnicodeString, StringAttributes, String);
8540462c92SVictor Perevertkin }
8640462c92SVictor Perevertkin
8740462c92SVictor Perevertkin //
8840462c92SVictor Perevertkin // WDF Function: WdfStringGetUnicodeString
8940462c92SVictor Perevertkin //
9040462c92SVictor Perevertkin typedef
9140462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL)
9240462c92SVictor Perevertkin WDFAPI
9340462c92SVictor Perevertkin VOID
94*545df815SVictor Perevertkin (STDCALL *PFN_WDFSTRINGGETUNICODESTRING)(
9540462c92SVictor Perevertkin _In_
9640462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals,
9740462c92SVictor Perevertkin _In_
9840462c92SVictor Perevertkin WDFSTRING String,
9940462c92SVictor Perevertkin _Out_
10040462c92SVictor Perevertkin PUNICODE_STRING UnicodeString
10140462c92SVictor Perevertkin );
10240462c92SVictor Perevertkin
_IRQL_requires_max_(PASSIVE_LEVEL)10340462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL)
10440462c92SVictor Perevertkin FORCEINLINE
105*545df815SVictor Perevertkin VOID
10640462c92SVictor Perevertkin WdfStringGetUnicodeString(
10740462c92SVictor Perevertkin _In_
10840462c92SVictor Perevertkin WDFSTRING String,
10940462c92SVictor Perevertkin _Out_
11040462c92SVictor Perevertkin PUNICODE_STRING UnicodeString
11140462c92SVictor Perevertkin )
11240462c92SVictor Perevertkin {
11340462c92SVictor Perevertkin ((PFN_WDFSTRINGGETUNICODESTRING) WdfFunctions[WdfStringGetUnicodeStringTableIndex])(WdfDriverGlobals, String, UnicodeString);
11440462c92SVictor Perevertkin }
11540462c92SVictor Perevertkin
11640462c92SVictor Perevertkin
11740462c92SVictor Perevertkin
11840462c92SVictor Perevertkin #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
11940462c92SVictor Perevertkin
12040462c92SVictor Perevertkin
12140462c92SVictor Perevertkin WDF_EXTERN_C_END
12240462c92SVictor Perevertkin
12340462c92SVictor Perevertkin #endif // _WDFSTRING_H_
12440462c92SVictor Perevertkin
125