Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle IDispatch passing to COM method

Status
Not open for further replies.

dnasdf

Programmer
Mar 1, 2004
3
JP
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" and "item 3" via pDispatch ???
}

}


Thank you.

dnasdf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top