How to pass double pointers for COM Interop via MethodInfo.Invoke ?

Discussion in 'C#' started by glitteringsound, Sep 6, 2010.

  1. glitteringsound

    glitteringsound New Member

    Joined:
    Sep 6, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I need to make COM IntetrOp at runtime using reflections. My native COM Object's exposed methods have some parameters as pointers (DWORD*) and some double pointers (DWORD**) and some are user defined types(e.g SomeUDTType objSmeUDTType) and its pointer to pointer(i.e. SomeUDTType **pSomeUDTType).

    I need to pass pointers to pointers. For now how can I be able to populate "object" array as pointers to pointers of SomeUDTType.

    Native COM exposed method :

    STDMETHODIMP MyCallableMethod(DWORD *value_1,BSTR *bstrName,WESContext **a_wesContext

    tlbImp generated output:

    DTINIDLLib.RuntimeCallingClass.MyCallableMethod(ref uint, ref string, System.IntrPtr)


    Regards
    Usman
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice