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

COM

 
GeneralRe: Help please ...COM client Pin
Jörgen Sigvardsson9-Jan-04 11:14
Jörgen Sigvardsson9-Jan-04 11:14 
GeneralRe: Help please ...COM client Pin
Jörgen Sigvardsson9-Jan-04 11:13
Jörgen Sigvardsson9-Jan-04 11:13 
GeneralDCOM Pin
rajusnair9-Jan-04 4:50
rajusnair9-Jan-04 4:50 
GeneralMemory Leakage. Pin
JigarThakkar8-Jan-04 22:49
JigarThakkar8-Jan-04 22:49 
GeneralRe: Memory Leakage. Pin
Jörgen Sigvardsson9-Jan-04 9:41
Jörgen Sigvardsson9-Jan-04 9:41 
GeneralCOM client in VB Pin
Member 8040808-Jan-04 18:24
Member 8040808-Jan-04 18:24 
GeneralRe: COM client in VB Pin
Jörgen Sigvardsson9-Jan-04 9:50
Jörgen Sigvardsson9-Jan-04 9:50 
QuestionC++ unable to access COM object, but VB can? Pin
Nathan Brown8-Jan-04 11:27
Nathan Brown8-Jan-04 11:27 
Hello, I am having a frustrating problem. While I am not an expert in COM, I have done my share.

I am trying to connect to a program that exposes an ActiveX interface, it supplies the Type Library file (.tbl) which I have imported into my C++ project, however, it does not register its self with the registery. Also, there isn't a CLSID available. So none of the normal C++ functions work. Did I mention that accessing it through VB works? (well VBscript).

It ends up that the program I am trying to access only registers in OLE's Running Object Table. I can use CoGetObject() (of course there isn't many examples of it) to find it, but then my program is unable to call the functions and crashes when m_lpDispatch->Invoke() is called in the InvokeHelper function.

My CoGeObject looks like this:

BIND_OPTS bind_op;
// ... fill out the options.
REFIID riid = IID_IDispatch;
IBACtalkActiveXInterface * p_ibac = NULL;      // Use class constructed from Type Library

int result = CoGetObject(OLESTR("bactalk.activex.interface"), &bind_op, rrid, (void **)&p_ibac);  // this succeeds when the program is running

p_ibac->SendTimeSync();         // crashes inside of COleDispatchDriver::InvokeHelper(...)


I'm not sure what is going on. My main question is why does it work in VB and not in C++. Arg. I've tried everything I can think of, so any insight would be most helpful. Should I not use the COleDispatchDriver derived class any more?

Thanks,
Nathan Brown
AnswerRe: C++ unable to access COM object, but VB can? Pin
Vi28-Jan-04 21:24
Vi28-Jan-04 21:24 
GeneralRe: C++ unable to access COM object, but VB can? Pin
Nathan Brown9-Jan-04 13:12
Nathan Brown9-Jan-04 13:12 
GeneralRe: C++ unable to access COM object, but VB can? Pin
Vi211-Jan-04 21:02
Vi211-Jan-04 21:02 
GeneralRe: C++ unable to access COM object, but VB can? Pin
Nathan Brown27-Jan-04 13:37
Nathan Brown27-Jan-04 13:37 
AnswerRe: C++ unable to access COM object, but VB can? Pin
Jörgen Sigvardsson9-Jan-04 9:57
Jörgen Sigvardsson9-Jan-04 9:57 
GeneralRe: C++ unable to access COM object, but VB can? Pin
Nathan Brown9-Jan-04 13:22
Nathan Brown9-Jan-04 13:22 
GeneralRe: C++ unable to access COM object, but VB can? Pin
Jörgen Sigvardsson9-Jan-04 13:34
Jörgen Sigvardsson9-Jan-04 13:34 
QuestionHow to bypass login window? Pin
SiddharthAtw7-Jan-04 18:23
SiddharthAtw7-Jan-04 18:23 
GeneralA property of a user defined ATL class Pin
Gush6-Jan-04 12:23
Gush6-Jan-04 12:23 
QuestionHow to use IWMPPluginUI::TranslateAccelerator? Pin
IGx896-Jan-04 5:07
IGx896-Jan-04 5:07 
GeneralTutorial on COM Pin
Omar Alvi5-Jan-04 4:45
Omar Alvi5-Jan-04 4:45 
GeneralRe: Tutorial on COM Pin
valikac5-Jan-04 4:59
valikac5-Jan-04 4:59 
GeneralCOM & VB.NET overloading Pin
izotov5-Jan-04 2:36
izotov5-Jan-04 2:36 
GeneralRe: COM & VB.NET overloading Pin
Heath Stewart5-Jan-04 13:41
protectorHeath Stewart5-Jan-04 13:41 
GeneralRe: COM & VB.NET overloading Pin
Jörgen Sigvardsson6-Jan-04 6:12
Jörgen Sigvardsson6-Jan-04 6:12 
GeneralRe: COM & VB.NET overloading Pin
Niels Penneman12-Jan-04 10:21
Niels Penneman12-Jan-04 10:21 
GeneralRe: COM & VB.NET overloading Pin
Jörgen Sigvardsson12-Jan-04 10:23
Jörgen Sigvardsson12-Jan-04 10:23 

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.