(wdm.h) RtlInitUnicodeString 函式

如需詳細資訊,請參閱 WdmlibRtlInitUnicodeStringEx 函 式。

語法

NTSYSAPI VOID RtlInitUnicodeString(
  [out]          PUNICODE_STRING         DestinationString,
  [in, optional] __drv_aliasesMem PCWSTR SourceString
);

參數

[out] DestinationString

如需詳細資訊,請參閱 WdmlibRtlInitUnicodeStringEx 函 式。

[in, optional] SourceString

如需詳細資訊,請參閱 WdmlibRtlInitUnicodeStringEx 函 式。

傳回值

如需詳細資訊,請參閱 WdmlibRtlInitUnicodeStringEx 函 式。

備註

RTL_CONSTANT_STRING宏會建立字串或 Unicode 字串結構來保存計數位符串。

STRING RTL_CONSTANT_STRING(
  [in]  PCSZ SourceString
);

UNICODE_STRING RTL_CONSTANT_STRING(
  [in]  PCWSTR SourceString
);

RTL_CONSTANT_STRING 會傳回字串結構或 Unicode 字串結構。

RTL_CONSTANT_STRING宏會在傳遞常數位符串時取代 RtlInitAnsiStringRtlInitStringRtlInitUnicodeString 例程。

您可以使用 RTL_CONSTANT_STRING 來初始化全域變數。

規格需求

需求
最低支援的用戶端 從 Windows 2000 開始提供。
目標平台 Universal
標頭 wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h、Wudfwdm.h)
程式庫 NtosKrnl.lib
Dll NtosKrnl.exe
IRQL 如需詳細資訊,請參閱 WdmlibRtlInitUnicodeStringEx 函式的一節。

另請參閱

RtlUnicodeStringInit

RtlUnicodeStringInitEx

UNICODE_STRING

WdmlibRtlInitUnicodeStringEx