C# 클래스 Microsoft.Scripting.ComInterop.ComEventSinkProxy

ComEventSinkProxy class is responsible for handling QIs for sourceIid on instances of ComEventSink. Background: When a COM even sink advises to a connection point it is supposed to hand over the dispinterface. Now, some hosts will trust the COM client to pass the correct pointer, but some will not. E.g. Excel's implementation of Connection Points will not cause a QI on the pointer that has been passed, however Word will QI the pointer to return the required interface. ComEventSink does not, strongly speaking, implements the interface that it claims to implement - it is just "faking" it by using IReflect. Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To prevent this we take advangate of RealProxy's ability of "dressing up" like other classes and hence successfully respond to QIs for interfaces that it does not really support( it is OK to say "I implement this interface" for event sinks only since the common practice is to use IDistpach.Invoke when calling into event sinks).
상속: System.Runtime.Remoting.Proxies.RealProxy
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
ComEventSinkProxy ( ComEventSink sink, System.Guid sinkIid ) : System
SupportsInterface ( System.Guid &iid ) : IntPtr

비공개 메소드들

메소드 설명
ComEventSinkProxy ( ) : System
Invoke ( IMessage msg ) : IMessage

메소드 상세

ComEventSinkProxy() 공개 메소드

public ComEventSinkProxy ( ComEventSink sink, System.Guid sinkIid ) : System
sink ComEventSink
sinkIid System.Guid
리턴 System

SupportsInterface() 공개 메소드

public SupportsInterface ( System.Guid &iid ) : IntPtr
iid System.Guid
리턴 System.IntPtr