Data Types C# Help

For dual and dispatch interfaces, the data types that can be used with COM are restricted to a list of
autemation-compatible data types.

The Invoke method of the IDispatch interface accepts an array
of VARIANTdata types. The :VARIANTis a union of many different data types, such as BYTE,SHORT,LONG,
FLOAT,DOUBLE,BSTR, IUnknown*, IDispatch*, and so on.

VARIANTShave been easy to use from Visual
Basic, but it was complex to use them from C++ .. NET has the Object class instead of VARIANTS.
With custom interfaces, all data types available with C++ can be used with COM. However, this also
restricts the clients that can use this component to certain programming languages.

Posted on October 27, 2015 in Interoperability

Share the Story

Back to Top
Share This