Calling COM interfaces at runtime

  • Thread starter Thread starter Jayme Pechan
  • Start date Start date
J

Jayme Pechan

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.
 
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
http://www.developerfusion.com/show/1783/3/

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.
 
Back
Top