...

View Full Version : How to handle IDispatch passing to COM method



gordon
03-12-2004, 10:40 AM
Hi all,

Could anybody tell me how to handle IDispatch passing
to COM method created by ATL?

### JScript ###
var x = [ "item 1", "item 2", "item 3" ];
oActiveX.myMethod(x);

### COM ###
myMethod(VARIANT x)
{
if( x.vt = VT_IDISPATCH )
{
IDispatch *pDispatch = x.pdispVal;

// Please tell me how to get "item 1", "item 2", "item 3"
// via pDispatch ???
}

}


Thank you.

gordon

swmr
03-12-2004, 06:20 PM
Microsoft Windows Script Interfaces
IDispatchEx Interface (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jslrfIDispatchEx.asp)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum