Click here to Skip to main content
15,894,241 members
Home / Discussions / COM
   

COM

 
GeneralRe: Passing an interface through an ATL interface Pin
Mark Janveaux6-Aug-02 13:01
Mark Janveaux6-Aug-02 13:01 
GeneralRe: Passing an interface through an ATL interface Pin
HawkSoftware6-Aug-02 15:46
HawkSoftware6-Aug-02 15:46 
GeneralRe: Passing an interface through an ATL interface Pin
Mark Janveaux6-Aug-02 17:45
Mark Janveaux6-Aug-02 17:45 
GeneralAdding MFC to existing COM Server DLL Pin
b_p_smith6-Aug-02 4:23
b_p_smith6-Aug-02 4:23 
GeneralRe: Adding MFC to existing COM Server DLL Pin
Anonymous7-Aug-02 23:59
Anonymous7-Aug-02 23:59 
GeneralRe: Adding MFC to existing COM Server DLL Pin
b_p_smith8-Aug-02 3:30
b_p_smith8-Aug-02 3:30 
GeneralRe: Adding MFC to existing COM Server DLL Pin
Vi29-Aug-02 1:36
Vi29-Aug-02 1:36 
GeneralReturning a dispinterface from VC to VB Pin
Jon Taylor5-Aug-02 11:06
Jon Taylor5-Aug-02 11:06 
I'm trying to write a function which returns a pointer to itself from my ATL C++ code to a VB application. My ATL object uses dispinterfaces to be compatible with VB. In my IDL, I declare the my function:

[id(1)] HRESULT GetComponent ([out, retval] IDispatch *pRetval);

I implement the function OK and return a pointer to IDispatch that I've obtained with QueryInterface. Oh, this interface is part of a coclass alled "MyControl". So GetComponent basically returns QueryInterface on "this". (And it works, tooSmile | :) )

I declare the interface as "oleautomation". Now using the Visual Basic object browser, I can see my GetComponent method and it's returning an "object". Now, I can set it OK if I set it as an object:

Dim Test as Object
Set Test = oControl.GetComponent ' oControl is type MyControl

However, if I declare "Test" as type "MyControl", I get a type mismatch:

Dim Test as MyControl
set Test = oControl.GetComponent ' Causes a type mismatch

Help! I just cannot get this to work. Is there something i must mark the IDL with, or is this a Visual Basic issue?Mad | :mad:

Thanks in advance Smile | :)
Jon
GeneralRe: Returning a dispinterface from VC to VB Pin
Vi26-Aug-02 2:14
Vi26-Aug-02 2:14 
Generalhelp needed...!!! Pin
drmzunlimited5-Aug-02 7:43
drmzunlimited5-Aug-02 7:43 
QuestionConnect to external InProc Server ? Pin
Mark Janveaux4-Aug-02 20:45
Mark Janveaux4-Aug-02 20:45 
AnswerRe: Connect to external InProc Server ? Pin
Jawid7-Aug-02 5:32
Jawid7-Aug-02 5:32 
AnswerRe: Another way - ROT Pin
Vi27-Aug-02 6:04
Vi27-Aug-02 6:04 
GeneralReceive events in vb from an interface returned by a method Pin
farrukh khalil4-Aug-02 19:19
sussfarrukh khalil4-Aug-02 19:19 
GeneralRe: Receive events in vb from an interface returned by a method Pin
Vi24-Aug-02 20:16
Vi24-Aug-02 20:16 
GeneralComAddin and addin Pin
Gheyret4-Aug-02 18:53
Gheyret4-Aug-02 18:53 
QuestionATL Problems?? Pin
Leesen3-Aug-02 22:56
Leesen3-Aug-02 22:56 
AnswerRe: ATL Problems?? Pin
Vi24-Aug-02 20:12
Vi24-Aug-02 20:12 
QuestionHow to get CLSID for the underlying object. Pin
cagey2-Aug-02 10:04
cagey2-Aug-02 10:04 
AnswerRe: How to get CLSID for the underlying object. Pin
soptest2-Aug-02 13:17
soptest2-Aug-02 13:17 
GeneralRe: How to get CLSID for the underlying object. Pin
Gertjan Schuurmans4-Aug-02 2:55
Gertjan Schuurmans4-Aug-02 2:55 
GeneralCOM+ Remote Transient Event Subscription Pin
d2hilst2-Aug-02 3:56
d2hilst2-Aug-02 3:56 
QuestionImplemented QueryStatus... but I get idl errors? Pin
Tommy Svensson2-Aug-02 0:23
Tommy Svensson2-Aug-02 0:23 
AnswerRe: Implemented QueryStatus... but I get idl errors? Pin
Vi22-Aug-02 1:22
Vi22-Aug-02 1:22 
GeneralCreating a Typelib Pin
Brigg Thorp1-Aug-02 7:13
Brigg Thorp1-Aug-02 7: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.