DispatchWrapper 클래스

정의

주의

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

마샬러가 VT_DISPATCH으로 마샬링할 개체를 래핑합니다.

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
상속
DispatchWrapper
특성

설명

를 사용하여 마샬러가 로 마샬링해야 하는 개체를 래핑합니다 VT_DISPATCH. 이 래퍼는 개체를 로 VT_DISPATCH마샬링하도록 강제합니다. 개체가 지원하지 IDispatch 않으면 예외가 throw됩니다.

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

에 대한 VT_DISPATCH자세한 내용은 MSDN 라이브러리의 에 대한 VARENUM::VT_DISPATCH 기존 설명서를 참조하세요.

생성자

DispatchWrapper(Object)
사용되지 않음.

래핑할 개체를 사용하여 DispatchWrapper 클래스의 새 인스턴스를 초기화합니다.

속성

WrappedObject
사용되지 않음.

DispatchWrapper로 래핑될 개체를 가져옵니다.

메서드

Equals(Object)
사용되지 않음.

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()
사용되지 않음.

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()
사용되지 않음.

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()
사용되지 않음.

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()
사용되지 않음.

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상