BStrWrapper 类

定义

注意

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

VT_BSTR 类型的数据从托管代码封送到非托管代码。 此类不能被继承。

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传递时封送的方式。 可以将 对象包装 String 在 对象中 BStrWrapper ,以将其封送为 VT_BSTRBStrWrapper 在将 null 字符串传递给非托管代码时很有用。 如果没有 BStrWrapper,空字符串将作为 VT_EMPTY传递;但是,用 BStrWrapper 包装字符串可确保空字符串作为 VT_BSTR传递。

构造函数

BStrWrapper(Object)
已过时.

使用指定的 Object 对象初始化 BStrWrapper 类的新实例。

BStrWrapper(String)
已过时.

使用指定的 String 对象初始化 BStrWrapper 类的新实例。

属性

WrappedObject
已过时.

获取将作为 VT_BSTR 类型进行封送的包装的 String 对象。

方法

Equals(Object)
已过时.

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()
已过时.

作为默认哈希函数。

(继承自 Object)
GetType()
已过时.

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()
已过时.

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()
已过时.

返回表示当前对象的字符串。

(继承自 Object)

适用于