Search This Blog

Monday, May 7, 2012

COM interop an interesting link


Here you can find an interesting link about COM interop

http://limbioliong.wordpress.com/2011/10/28/exposing-an-enumerator-from-managed-code-to-com/

This is one of his most important tips

The interface type should be either :

ComInterfaceType.InterfaceIsDual
or ComInterfaceType.InterfaceIsIDispatch
otherwise the GetEnumerator() method
will not be marked with dispid -4.
Without this dispid, this method
will not be recognized by COM as
returning an enumerator. It will not thus
not be usable in a VB6.0 For Each Next
statement.

No comments:

Post a Comment