ATL: ATL events question
Posted on 2003-11-09
I have a COM VC++ server which fires events and a VC++ client which catching the event using an ATL sink (IDispEventImpl). I have a SINK_MAP in the client, and the events are recieved OK.
My question is:
In the client I'm using #import to the .tlb/.dll of the server. If I do not use "named_guids" attribute, then I do
not get the events. Are the "named_guids" is a must attribute to recieve events ???
If it is a must then I have a second problem:
My server contains several Dll's, and inorder to make the client simpler I use the "rename_namespace" attribute to one common name:
#import "MyDll1.tlb" rename_namespace ("MyProj")
#import "MyDll2.tlb" rename_namespace ("MyProj")
#import "MyDll3.tlb" rename_namespace ("MyProj")
Now, when trying to add the "named_guids" attribute to each one of the "import" lines, I fail in compilation:
"'LIBID_MyProj' : redefinition; multiple initialization... "
Can someone please advise ???