Click here to Skip to main content
15,887,746 members
Home / Discussions / COM
   

COM

 
GeneralRe: ATL / COM question Pin
__makaveli__9-Jan-05 22:05
__makaveli__9-Jan-05 22:05 
GeneralRe: ATL / COM question Pin
Martin Koorts9-Jan-05 22:44
Martin Koorts9-Jan-05 22:44 
GeneralRe: ATL / COM question Pin
__makaveli__9-Jan-05 23:32
__makaveli__9-Jan-05 23:32 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 1:03
Martin Koorts10-Jan-05 1:03 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 1:09
__makaveli__10-Jan-05 1:09 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 3:33
Martin Koorts10-Jan-05 3:33 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 4:54
__makaveli__10-Jan-05 4:54 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 5:58
Martin Koorts10-Jan-05 5:58 
Chill

It's not really feasible to have 2 DLLs - you can have both, but to my mind it just confuses things too much.
The DLL that uses the COM object (eg. calling OpenReport, etc) should be the same one that provides the events object that implements the IReportEvent interface. The theory is; if you see the following in a type library;

coclass Report {
[default] interface IReport;
interface IDReport;
[default, source] dispinterface IReportEvent;
};

it means that the Report class promises to implement IReport and IDReport, but *not* IReportEvent because that's the one you need to implement and give to the Report instance (you've created) by using the Advise/Unadvise methods mentioned earlier - this is indicated with the 'source' IDL attribute.

So, the code I gave you resembles something to be put in your work DLL and replaces the need for an ATL wrapper DLL that is generated from the type library. You can use the wizard-generated ATL DLL code as a hint to what the SINK_MAP entries should look like ....a handy reference.

As an aside, if you haven't already, use OleView to inspect Crystal's CRAXDDRT20.DLL (or similar) to see what the type library looks like.

Also, get 'ATL Internals' by Brent Rector, Chris Sells - it explains all this stuff much better than I can.

Wink | ;-)
Martin

GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 22:16
__makaveli__10-Jan-05 22:16 
GeneralRe: ATL / COM question Pin
__makaveli__10-Jan-05 22:39
__makaveli__10-Jan-05 22:39 
GeneralRe: ATL / COM question Pin
Martin Koorts10-Jan-05 23:06
Martin Koorts10-Jan-05 23:06 
GeneralThe OLE clipboard and Word 2003 Pin
Steve DeLassus6-Jan-05 7:27
Steve DeLassus6-Jan-05 7:27 
GeneralActiveX VBScripting problem Pin
mdave5-Jan-05 7:58
mdave5-Jan-05 7:58 
GeneralInterface Discovery - Modification Pin
KragAapie4-Jan-05 19:01
KragAapie4-Jan-05 19:01 
GeneralRe: Interface Discovery - Modification Pin
Martin Koorts9-Jan-05 22:19
Martin Koorts9-Jan-05 22:19 
GeneralRe: Interface Discovery - Modification Pin
geo_m16-Jan-05 20:58
geo_m16-Jan-05 20:58 
GeneralHelp in creating Arrow OCX Pin
Surya Prakash Adari4-Jan-05 18:09
Surya Prakash Adari4-Jan-05 18:09 
GeneralCreating threads in VB6 Activex DLL Pin
K.Sandeep4-Jan-05 0:32
K.Sandeep4-Jan-05 0:32 
GeneralRemoving the type library from a DLL Pin
Shutter3-Jan-05 15:47
Shutter3-Jan-05 15:47 
GeneralRe: Removing the type library from a DLL Pin
FearlessBurner4-Jan-05 10:34
FearlessBurner4-Jan-05 10:34 
GeneralRe: Removing the type library from a DLL Pin
Shutter4-Jan-05 11:39
Shutter4-Jan-05 11:39 
GeneralRe: Removing the type library from a DLL Pin
ThatsAlok4-Jan-05 17:25
ThatsAlok4-Jan-05 17:25 
GeneralRe: Removing the type library from a DLL Pin
FearlessBurner5-Jan-05 6:20
FearlessBurner5-Jan-05 6:20 
GeneralRe: Removing the type library from a DLL Pin
ThatsAlok5-Jan-05 6:47
ThatsAlok5-Jan-05 6:47 
GeneralHelp!! VB6 .ocx in VB.NET.... Pin
Sylan3-Jan-05 8:38
Sylan3-Jan-05 8:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.