BStrWrapper 類別

定義

警告

BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.

VT_BSTR 型別的資料從 Managed 封送處理成 Unmanaged 程式碼。 此類別無法獲得繼承。

public ref class BStrWrapper sealed
[System.Obsolete("BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")]
public sealed class BStrWrapper
public sealed class BStrWrapper
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class BStrWrapper
[<System.Obsolete("BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")>]
type BStrWrapper = class
type BStrWrapper = class
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type BStrWrapper = class
Public NotInheritable Class BStrWrapper
繼承
BStrWrapper
屬性

備註

類別 BStrWrapper 控制當傳遞為 VARIANT 時,包裝物件如何封送處理。 您可以將 物件包裝 StringBStrWrapper 物件中,將其封送處理為 VT_BSTRBStrWrapper 將 Null 字串傳遞至 Unmanaged 程式碼時很有用。 如果沒有 BStrWrapper ,則會將 Null 字串傳遞為 VT_EMPTY ,不過,使用 包裝字串 BStrWrapper 可確保 Null 字串傳遞為 VT_BSTR

建構函式

BStrWrapper(Object)
已淘汰.

使用指定的 BStrWrapper 物件,初始化 Object 類別的新執行個體。

BStrWrapper(String)
已淘汰.

使用指定的 BStrWrapper 物件,初始化 String 類別的新執行個體。

屬性

WrappedObject
已淘汰.

取得要當做型別 VT_BSTR 封送處理的已包裝 String 物件。

方法

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於