Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Because no library is created for COM Connection Points if I expose Connection Points directly to Net they appear in C# as being under my DLL's namespace. Is there a way to properly expose the Connection Point interfaces to Net without using IDispatch?

What I have tried:

wrapping the interfaces and brokering the connection.
Posted
Updated 30-Aug-18 11:53am

Sounds like you have some problems in your build settings. Connection points are derived from iDispatch, so they are immanent and you need understand that technique better. Read the articel COM Connection Points to understand it better.

Tip: create a new project with the Visual Studio wizard and import your code into it. (or compare the settings with your project)
 
Share this answer
 
the connection point interfaces are defined in OCidl.idl. all four interfaces derive directly from IUnknown interface and not IDispatch. the solution to my problem has nothing to do with project settings. i believe the core problem is i am not using atl. atl creates an automation server by default. when atl creates a connection point it creates either an automation interface, or a dual interface. there is nothing wrong with using a com 1.0 coclass. as for the namespace, it's just like having a class that derives multiple interfaces that derive from iunknown. when casting to iunknown, you should be casting through one of the derived interfaces.

at least that's my take on it.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900