Click here to Skip to main content
15,920,438 members
Home / Discussions / COM
   

COM

 
Questionhow to write avi files Pin
limra1-Aug-05 22:09
limra1-Aug-05 22:09 
QuestionHow to Show selected ActiveX controls in a list Box Pin
Ashwin kumar Gurujala31-Jul-05 20:54
Ashwin kumar Gurujala31-Jul-05 20:54 
QuestionHow to manipulate ActiveDesktop buttons Pin
programvinod31-Jul-05 7:39
programvinod31-Jul-05 7:39 
QuestionHow to share stated COM+ objects cross process and machine Pin
xqxq30-Jul-05 16:35
xqxq30-Jul-05 16:35 
QuestionHow to interface a COM class in a non-COM DLL Pin
morenz30-Jul-05 4:04
morenz30-Jul-05 4:04 
AnswerRe: How to interface a COM class in a non-COM DLL Pin
geo_m31-Jul-05 10:32
geo_m31-Jul-05 10:32 
GeneralRe: How to interface a COM class in a non-COM DLL Pin
morenz31-Jul-05 12:49
morenz31-Jul-05 12:49 
GeneralRe: How to interface a COM class in a non-COM DLL Pin
geo_m31-Jul-05 19:08
geo_m31-Jul-05 19:08 
hm, as I could understand the ATL_NO_VTABLE problem, when you're including the object.h file, the code generated with #import never contain the ATL macros. You probably forgot to remove the object.h include.

I always used #import "blahblah.tlb" no_namespace named_guids for including COM objects to my projects. Problem is, that this doesn't import the object as-is from the C++ point of view. It defines all interfaces the object is derived from and all Guids required for the object - Guids of interfaces and of the object itself. If you look into your debug (or release) directory, you'll see object.tlh and object.tli (optional), that contains code generated by the #import.

Well, when you have the interfaces imported, you can use one of them as a controlling interface. General interface is IUnknown. From this you can QueryInterface to get any other interface exported by the object.

The CComObject thing is when you decide not to import interfaces, but the C++ object definition.

The method I would choose depends on what you want to achieve, but generally I'd prefer to
a) create a special interface for controlling the DCOM object, passed to the .dlls
b) create a third c++ object, that is included in the DCOM as well as in the .dlls. It's purpose is only for exchanging the information - the DCOM object creates one instance and passes it to all calls to the .dlls. Or even considering the implementation to be in the C++ object and only calls from outside will be proxied through the DCOM object.
Then the DCOM object will be only very thin wrapper - generally only thing it will does will be to create the third object (or derive from) and then simply proxy all calls from DCOM to the C++ object. I hope the explanation is clear, here's 7:00 morning Wink | ;-)

The a) and b) are more or less equal, the a) is more COMish, while the b) is more C++ish.
GeneralRe: How to interface a COM class in a non-COM DLL Pin
morenz1-Aug-05 12:42
morenz1-Aug-05 12:42 
QuestionHow to access COM enums from JScript Pin
kozu29-Jul-05 11:35
kozu29-Jul-05 11:35 
QuestionHow to make DCOM work over VPN ? Pin
vgrigor129-Jul-05 4:40
vgrigor129-Jul-05 4:40 
Questionhow to create COM DLL ..Help Me Pin
Anonymous29-Jul-05 1:18
Anonymous29-Jul-05 1:18 
AnswerRe: how to create COM DLL ..Help Me Pin
vgrigor129-Jul-05 4:48
vgrigor129-Jul-05 4:48 
AnswerRe: how to create COM DLL ..Help Me Pin
Logan from Singapore31-Jul-05 16:12
Logan from Singapore31-Jul-05 16:12 
Questionhow to create DLL ..Help Me Pin
Anonymous29-Jul-05 1:17
Anonymous29-Jul-05 1:17 
GeneralCOM Interop event handling - help! Pin
Will-FG28-Jul-05 23:50
Will-FG28-Jul-05 23:50 
GeneralLoading ActiveX under Limitted User Account Pin
MohammadAmiry28-Jul-05 7:32
MohammadAmiry28-Jul-05 7:32 
GeneralRe: Loading ActiveX under Limitted User Account Pin
vishalmore29-Jul-05 21:49
vishalmore29-Jul-05 21:49 
GeneralCall a running C# application from a C++ application Pin
scchan198427-Jul-05 22:02
scchan198427-Jul-05 22:02 
GeneralRe: Call a running C# application from a C++ application Pin
Lim Bio Liong29-Jul-05 2:54
Lim Bio Liong29-Jul-05 2:54 
GeneralRe: Call a running C# application from a C++ application Pin
Lim Bio Liong29-Jul-05 11:04
Lim Bio Liong29-Jul-05 11:04 
Questionhow to connect modem to CPU by using visual basic Pin
Member 214288927-Jul-05 20:26
Member 214288927-Jul-05 20:26 
GeneralOutlook 2003 COM AddIn Pin
civilwar27-Jul-05 4:04
civilwar27-Jul-05 4:04 
GeneralHelp!!!!! Need to do COM DLL with multiple objects Pin
Logan from Singapore27-Jul-05 0:37
Logan from Singapore27-Jul-05 0:37 
GeneralRe: Help!!!!! Need to do COM DLL with multiple objects Pin
Jörgen Sigvardsson27-Jul-05 3:03
Jörgen Sigvardsson27-Jul-05 3:03 

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.