Calling COM interfaces at runtime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jayme Pechan

    Calling COM interfaces at runtime

    Does anyone know if there is a way to make a call to a COM interface from C#
    that you do not know the type information until runtime? In C++ you would
    just call GetIDsOfNames to get the dispatch ID and then call invoke with the
    ID. Thanks.


  • Peter Huang [MSFT]

    #2
    RE: Calling COM interfaces at runtime

    Hi

    I think you means the LateBinding in C#.
    In C# we can use the InvokeMember to call a method on certain type and the
    type can be determined in runtime.
    Here is a link for your reference.
    Accessing a COM component - Late Binding


    Best regards,

    Peter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Comment

    Working...