C# Class Microsoft.Scripting.ComInterop.ComRuntimeHelpers

Show file Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
CreateComEvent ( object rcw, System.Guid sourceIid, int dispid ) : BoundDispEvent
CreateDispCallable ( IDispatchComObject dispatch, ComMethodDesc method ) : DispCallable

Private Methods

Method Description
CheckIfMissingTypeInfoIsExpected ( int hresult, bool throwIfMissingExpectedTypeInfo ) : void

This method should be called when typeinfo is not available for an object. The function will check if the typeinfo is expected to be missing. This can include error cases where the same error is guaranteed to happen all the time, on all machines, under all circumstances. In such cases, we just have to operate without the typeinfo. However, if accessing the typeinfo is failing in a transient way, we might want to throw an exception so that we will eagerly predictably indicate the problem.

CheckThrowException ( int hresult, ExcepInfo &excepInfo, uint argErr, string message ) : void
GetITypeInfoFromIDispatch ( IDispatch dispatch, bool throwIfMissingExpectedTypeInfo ) : System.Runtime.InteropServices.ComTypes.ITypeInfo

Look for typeinfo using IDispatch.GetTypeInfo

GetInfoFromType ( System.Runtime.InteropServices.ComTypes typeInfo, string &name, string &documentation ) : void
GetNameOfLib ( System.Runtime.InteropServices.ComTypes typeLib ) : string
GetNameOfMethod ( System.Runtime.InteropServices.ComTypes typeInfo, int memid ) : string
GetNameOfType ( System.Runtime.InteropServices.ComTypes typeInfo ) : string
GetTypeAttrForTypeInfo ( System.Runtime.InteropServices.ComTypes typeInfo ) : TYPEATTR
GetTypeAttrForTypeLib ( System.Runtime.InteropServices.ComTypes typeLib ) : TYPELIBATTR

Method Details

CreateComEvent() public static method

public static CreateComEvent ( object rcw, System.Guid sourceIid, int dispid ) : BoundDispEvent
rcw object
sourceIid System.Guid
dispid int
return BoundDispEvent

CreateDispCallable() public static method

public static CreateDispCallable ( IDispatchComObject dispatch, ComMethodDesc method ) : DispCallable
dispatch IDispatchComObject
method ComMethodDesc
return DispCallable