Click here to Skip to main content
15,898,222 members
Home / Discussions / COM
   

COM

 
GeneralRe: Urgent : Regarding the delete w.r.t COM Pin
janadhana23-Oct-06 1:40
janadhana23-Oct-06 1:40 
QuestionConverting exe to com Pin
ashokvishnu16-Oct-06 17:59
ashokvishnu16-Oct-06 17:59 
AnswerRe: Converting exe to com Pin
Mike Dimmick17-Oct-06 0:09
Mike Dimmick17-Oct-06 0:09 
GeneralRe: Converting exe to com Pin
ashokvishnu17-Oct-06 0:58
ashokvishnu17-Oct-06 0:58 
GeneralRe: Converting exe to com Pin
mpk197917-Oct-06 21:22
mpk197917-Oct-06 21:22 
GeneralRe: Converting exe to com Pin
Mike Dimmick18-Oct-06 0:42
Mike Dimmick18-Oct-06 0:42 
GeneralRe: Converting exe to com Pin
mpk197918-Oct-06 20:17
mpk197918-Oct-06 20:17 
GeneralRe: Converting exe to com Pin
Mike Dimmick18-Oct-06 1:02
Mike Dimmick18-Oct-06 1:02 
So you're saying that the interface to the other modules is changing from a flat interface (calling into DLL entry points) to a COM interface (calling through an interface pointer)?

The client should be able to supply you with the interface that the other modules will expose. Ideally they would be able to supply the .idl file containing the interface definition(s) or the .h file that is generated from the .idl. Worst case, you might have to use #import to get the compiler to extract the interface(s) from a type library. It depends how the components are implemented; if they're in C++ you can probably get the .idl or header. You will have to compile the IDL with the MIDL tool.

If you just need to manipulate, call through, those interfaces, you don't really need to do anything special. I normally use ATL's CComPtr and CComQIPtr class templates to manage the reference counts properly. Include the atlbase.h header to use these templates.

If the component has to call back into your manager application, then you will have to check with the client how they intend to do this. The simplest way from your application's perspective is if you define a regular COM interface containing the methods that the component will call, and pass this to a method in the component's interface. You will then need to implement a class that implements the interface. You might find ATL helpful to do this.

If the components are written in some other language, they may not be able to handle this. They might be raising events using the Automation event mechanism. This will require you to implement the dispatch interface defined in the component's type library (shown as a 'source' interface) so that the component can call you back, and to call the component's connection point container to connect your callback interface to the component. See ATL's CONNECT sample[^] for an example of how to do this.

Stability. What an interesting concept. -- Chris Maunder

GeneralRe: Converting exe to com Pin
ashokvishnu18-Oct-06 18:06
ashokvishnu18-Oct-06 18:06 
GeneralRe: Converting exe to com Pin
mpk197922-Oct-06 18:55
mpk197922-Oct-06 18:55 
Questionaccess controls Pin
vtalau16-Oct-06 17:51
vtalau16-Oct-06 17:51 
QuestionHandling events from COM without TypeLIB in C#.NET Pin
Aleksey.Andreev16-Oct-06 4:52
Aleksey.Andreev16-Oct-06 4:52 
GeneralRe: Handling events from COM without TypeLIB in C#.NET Pin
prasad_som16-Oct-06 21:23
prasad_som16-Oct-06 21:23 
QuestionVC++ app crashes unusally when COM functions called Pin
dharani16-Oct-06 3:16
dharani16-Oct-06 3:16 
QuestionRe: VC++ app crashes unusally when COM functions called Pin
prasad_som16-Oct-06 4:48
prasad_som16-Oct-06 4:48 
AnswerRe: VC++ app crashes unusally when COM functions called Pin
Hamid_RT18-Oct-06 19:27
Hamid_RT18-Oct-06 19:27 
QuestionCOM+ Pin
AnhTin13-Oct-06 23:15
AnhTin13-Oct-06 23:15 
AnswerRe: COM+ Pin
Steve S16-Oct-06 21:35
Steve S16-Oct-06 21:35 
QuestionMFC ActiveX Control Errors Pin
Stober13-Oct-06 9:48
Stober13-Oct-06 9:48 
AnswerRe: MFC ActiveX Control Errors Pin
Stober13-Oct-06 11:51
Stober13-Oct-06 11:51 
QuestionNeed Directshow Sample Pin
Manjunath S13-Oct-06 8:24
Manjunath S13-Oct-06 8:24 
QuestionHow to load XSD files using VC++ Pin
vgkotha12-Oct-06 20:18
vgkotha12-Oct-06 20:18 
AnswerRe: How to load XSD files using VC++ Pin
Hamid_RT18-Oct-06 19:33
Hamid_RT18-Oct-06 19:33 
QuestionMaking connection points work with MFC Pin
garyflet12-Oct-06 7:51
garyflet12-Oct-06 7:51 
QuestionPass BSTR with Connection point. Pin
HakunaMatada12-Oct-06 3:13
HakunaMatada12-Oct-06 3:13 

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.