共用方式為


LSA_STRING 結構 (lsalookup.h)

本機安全機構 (LSA) 函式會使用LSA_STRING結構來指定 ANSI 字串。

語法

typedef struct _LSA_STRING {
  USHORT Length;
  USHORT MaximumLength;
  PCHAR  Buffer;
} LSA_STRING, *PLSA_STRING;

成員

Length

指定 Buffer 中字串的長度,以位元組為單位。 此值不包含終止 Null 字元,如果有的話。

Length 結構成員為零且 MaximumLength 結構成員為 1 時, 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 個字節寫入緩衝區,而不需佔用記憶體。

Length 結構成員為零且 MaximumLength 結構成員為 1 時, 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 開始變更。

Buffer

字元陣列的指標。 請注意,LSA 傳回的字串可能不會以 Null 終止。

Length 結構成員為零且 MaximumLength 結構成員為 1 時, 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 開始變更。

規格需求

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