DispatchWrapper Sınıf

Tanım

Dikkat

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

Sıralayıcının hazırlaması gereken nesneleri olarak VT_DISPATCHsarmalar.

public ref class DispatchWrapper sealed
[System.Obsolete("DispatchWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")]
public sealed class DispatchWrapper
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public sealed class DispatchWrapper
public sealed class DispatchWrapper
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class DispatchWrapper
[<System.Obsolete("DispatchWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")>]
type DispatchWrapper = class
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
type DispatchWrapper = class
type DispatchWrapper = class
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type DispatchWrapper = class
Public NotInheritable Class DispatchWrapper
Devralma
DispatchWrapper
Öznitelikler

Açıklamalar

Sıralayıcının hazırlaması gereken nesneleri olarak VT_DISPATCHsarmalamak için kullanın. Bu sarmalayıcı nesneleri olarak VT_DISPATCHsıralanacak şekilde zorlar. Nesne desteklemiyorsa IDispatch bir özel durum oluşturulur.

void MyMethod(Object^ o);

void DoWrap()
{
    Object^ o = gcnew MyObject();
    MyMethod(o);                        // passes o as VT_UNKNOWN
    MyMethod(gcnew DispatchWrapper(o)); // passes o as VT_DISPATCH

    //...
}
void MyMethod(Object o);

public void DoWrap()
{
    Object o = new MyObject();
    MyMethod(o);                      // passes o as VT_UNKNOWN
    MyMethod(new DispatchWrapper(o)); // passes o as VT_DISPATCH

    //...
}
Sub MyMethod(o As Object)
    ' handle object ...
End Sub

Public Sub DoWrap()
    Dim o As Object = new MyObject()
    MyMethod(o)                      ' passes o as VT_UNKNOWN
    MyMethod(new DispatchWrapper(o)) ' passes o as VT_DISPATCH

    '...
End Sub

hakkında VT_DISPATCHdaha fazla bilgi için VARENUM::VT_DISPATCH msdn kitaplığındaki için mevcut belgelere bakın.

Oluşturucular

DispatchWrapper(Object)

Sarmalanan nesneyle sınıfının yeni bir örneğini DispatchWrapper başlatır.

Özellikler

WrappedObject

tarafından sarmalanan DispatchWrappernesnesini alır.

Yöntemler

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır