reactos/sdk/include/wdf/kmdf/1.17/wdfstring.h

125 lines
2.1 KiB
C
Raw Normal View History

/*++
Copyright (c) Microsoft Corporation. All rights reserved.
_WdfVersionBuild_
Module Name:
WdfString.h
Abstract:
This is the DDI for string handles.
Environment:
kernel mode only
Revision History:
--*/
//
// NOTE: This header is generated by stubwork. Please make any
// modifications to the corresponding template files
// (.x or .y) and use stubwork to regenerate the header
//
#ifndef _WDFSTRING_H_
#define _WDFSTRING_H_
#ifndef WDF_EXTERN_C
#ifdef __cplusplus
#define WDF_EXTERN_C extern "C"
#define WDF_EXTERN_C_START extern "C" {
#define WDF_EXTERN_C_END }
#else
#define WDF_EXTERN_C
#define WDF_EXTERN_C_START
#define WDF_EXTERN_C_END
#endif
#endif
WDF_EXTERN_C_START
#if (NTDDI_VERSION >= NTDDI_WIN2K)
//
// WDF Function: WdfStringCreate
//
typedef
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
NTSTATUS
(STDCALL *PFN_WDFSTRINGCREATE)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_opt_
PCUNICODE_STRING UnicodeString,
_In_opt_
PWDF_OBJECT_ATTRIBUTES StringAttributes,
_Out_
WDFSTRING* String
);
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
FORCEINLINE
NTSTATUS
WdfStringCreate(
_In_opt_
PCUNICODE_STRING UnicodeString,
_In_opt_
PWDF_OBJECT_ATTRIBUTES StringAttributes,
_Out_
WDFSTRING* String
)
{
return ((PFN_WDFSTRINGCREATE) WdfFunctions[WdfStringCreateTableIndex])(WdfDriverGlobals, UnicodeString, StringAttributes, String);
}
//
// WDF Function: WdfStringGetUnicodeString
//
typedef
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
VOID
(STDCALL *PFN_WDFSTRINGGETUNICODESTRING)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
_In_
WDFSTRING String,
_Out_
PUNICODE_STRING UnicodeString
);
_IRQL_requires_max_(PASSIVE_LEVEL)
FORCEINLINE
VOID
WdfStringGetUnicodeString(
_In_
WDFSTRING String,
_Out_
PUNICODE_STRING UnicodeString
)
{
((PFN_WDFSTRINGGETUNICODESTRING) WdfFunctions[WdfStringGetUnicodeStringTableIndex])(WdfDriverGlobals, String, UnicodeString);
}
#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
WDF_EXTERN_C_END
#endif // _WDFSTRING_H_