StructLayoutAttribute.CharSet 欄位

定義

表示根據預設,類別中的字串資料欄位應該封送處理為 LPWSTR,還是 LPSTR

public: System::Runtime::InteropServices::CharSet CharSet;
public System.Runtime.InteropServices.CharSet CharSet;
val mutable CharSet : System.Runtime.InteropServices.CharSet
Public CharSet As CharSet 

欄位值

備註

CharSet如果欄位設定CharSet.Unicode為 或 CharSet.Auto,則所有字串自變數都會在傳遞至 Unmanaged 實作之前,先 () 轉換成 Unicode 字元LPWSTR。 如果字位設定 CharSet.Ansi為 ,字串會轉換成 ANSI 字串, (LPSTR) 。

適用於

另請參閱