subauth.h (UNICODE_STRING 結構)

UNICODE_STRING結構是由各種本機安全機構 (LSA) 函式用來指定 Unicode 字串。

語法

typedef struct _UNICODE_STRING {
  USHORT Length;
  USHORT MaximumLength;
  PWSTR  Buffer;
} UNICODE_STRING, *PUNICODE_STRING;

成員

Length

指定 Buffer 成員所指向之字串的長度,以位元組為單位,如果有任何,則不包含終止 NULL 字元。

Windows 7、Windows Server 2008、Windows Vista、Windows Server 2003 和 Windows XP: Length 結構成員為零且 MaximumLength 結構成員為 1 時, Buffer 結構成員可以是空字串或只包含 Null 字元。 此行為從 Windows Server 2008 R2 和 SP1 的 Windows 7 開始變更。

MaximumLength

指定配置給 Buffer 的記憶體大小總計,以位元組為單位。 最多可將 MaximumLength 個字節寫入緩衝區,而不需佔用記憶體。

Windows 7、Windows Server 2008、Windows Vista、Windows Server 2003 和 Windows XP: Length 結構成員為零且 MaximumLength 結構成員為 1 時, Buffer 結構成員可以是空字串或只包含 Null 字元。 此行為從 Windows Server 2008 R2 和 SP1 的 Windows 7 開始變更。

Buffer

寬字元字串的指標。 請注意,各種 LSA 函式所傳回的字串可能不會 以 Null 結尾。

Windows 7、Windows Server 2008、Windows Vista、Windows Server 2003 和 Windows XP: Length 結構成員為零且 MaximumLength 結構成員為 1 時, Buffer 結構成員可以是空字串或只包含 Null 字元。 此行為從 Windows Server 2008 R2 和 SP1 的 Windows 7 開始變更。

規格需求

需求
最低支援的用戶端 Windows XP [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003 [僅限桌面應用程式]
標頭 subauth.h