Click here to Skip to main content
15,891,473 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Seeking introductory text on the STL Pin
sunlin728-Mar-10 20:29
sunlin728-Mar-10 20:29 
GeneralRe: Seeking introductory text on the STL Pin
Richard MacCutchan28-Mar-10 22:55
mveRichard MacCutchan28-Mar-10 22:55 
GeneralRe: Seeking introductory text on the STL Pin
sunlin729-Mar-10 4:47
sunlin729-Mar-10 4:47 
GeneralRe: Seeking introductory text on the STL Pin
Stuart Dootson28-Mar-10 8:03
professionalStuart Dootson28-Mar-10 8:03 
AnswerRe: Seeking introductory text on the STL Pin
LunaticFringe30-Mar-10 6:55
LunaticFringe30-Mar-10 6:55 
Questionuse of vector /map /list Pin
ramina sen24-Feb-10 22:59
ramina sen24-Feb-10 22:59 
AnswerRe: use of vector /map /list Pin
tasumisra25-Feb-10 0:41
tasumisra25-Feb-10 0:41 
QuestionPassing a string to a method that takes an IDispatch*? Pin
Rob Caldecott24-Feb-10 9:49
Rob Caldecott24-Feb-10 9:49 
I am converting an old VB COM object (which I didn't write) to C++ using ATL. One of the methods, according to the IDL, takes an IDispatch* as a parameter and the documentation and samples for this method claim that you can pass either a string (which is the progid of an object that will be created and used by the control) or an IDispatch* to an object that has already been created. How on earth do I implement this in ATL?

For example, the IDL:

[id(1)] HRESULT Test(IDispatch* obj);


The samples (which are all JScript):

obj.Test("foo.bar");


or

var someObject = new ActiveXObject("foo.bar");
obj.Test(someObject);


To make matters even more bizarre the actual VB code that implements this method actually declares the 'obj' parameter as a string! However, it all seems to work.

Can you even pass a string to a COM method that takes an IDispatch*? If so, can I determine that the IDispatch* is actually a string in my C++ ATL code? Even better, if it's an IDispatch that implements a specific interface I will want to call methods on it, or instantiate an object if it's a string.

I think that fact that JScript is in play here could be crucial (for example, JScript doesn't pass arrays as a SAFEARRAY and requires some magic to extract the length and the value of each element.)
AnswerRe: Passing a string to a method that takes an IDispatch*? Pin
Stuart Dootson24-Feb-10 21:01
professionalStuart Dootson24-Feb-10 21:01 
GeneralRe: Passing a string to a method that takes an IDispatch*? Pin
Rob Caldecott25-Feb-10 10:56
Rob Caldecott25-Feb-10 10:56 
GeneralRe: Passing a string to a method that takes an IDispatch*? Pin
Stuart Dootson25-Feb-10 11:36
professionalStuart Dootson25-Feb-10 11:36 
QuestionRun Only One Instance Of this AddOn In Multiple IE Win Pin
A_Fa24-Feb-10 3:06
A_Fa24-Feb-10 3:06 
AnswerRe: Run Only One Instance Of this AddOn In Multiple IE Win Pin
KingsGambit24-Feb-10 6:00
KingsGambit24-Feb-10 6:00 
QuestionCreating checkboxes dynamically from array Pin
Steven Foxton23-Feb-10 13:26
Steven Foxton23-Feb-10 13:26 
AnswerRe: Creating checkboxes dynamically from array Pin
«_Superman_»23-Feb-10 16:51
professional«_Superman_»23-Feb-10 16:51 
AnswerRe: Creating checkboxes dynamically from array Pin
Richard MacCutchan23-Feb-10 21:41
mveRichard MacCutchan23-Feb-10 21:41 
Questionvs 2008 and Icopy Pin
aurelcly23-Feb-10 7:41
aurelcly23-Feb-10 7:41 
AnswerRe: vs 2008 and Icopy Pin
Stuart Dootson23-Feb-10 14:01
professionalStuart Dootson23-Feb-10 14:01 
QuestionATL Server Exe Shutdown Hangs Pin
marko201022-Feb-10 14:31
marko201022-Feb-10 14:31 
AnswerRe: ATL Server Exe Shutdown Hangs [modified] Pin
KingsGambit22-Feb-10 17:42
KingsGambit22-Feb-10 17:42 
QuestionDirect3D Types as interface parameters Pin
Aschratt20-Feb-10 22:47
Aschratt20-Feb-10 22:47 
AnswerRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 2:03
Jonathan Davies21-Feb-10 2:03 
GeneralRe: Direct3D Types as interface parameters Pin
Aschratt21-Feb-10 2:07
Aschratt21-Feb-10 2:07 
GeneralRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 2:24
Jonathan Davies21-Feb-10 2:24 
GeneralRe: Direct3D Types as interface parameters Pin
Aschratt21-Feb-10 2:32
Aschratt21-Feb-10 2:32 

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.