Board index » cppbuilder » how to pass multiple arguments through a tagSAFEARRAY** ?
how to pass multiple arguments through a tagSAFEARRAY** ?
2005-06-20 07:11:41 PM
I have this object that i imported, that can have a series of strings as
arguments, but bcb wants it in a tagSAFEARRAY** ...
From this other post i read on this newsgroup I experimented a bit with
VARIANTOBJ which has a conversion thingie, which compiled but then
resulted in an error during runtime.
How would i go about passing multiple strings to this object?
AnsiString cmdLine = "stringone stringtwo stringthree" ;
VARIANTOBJ olecmd = cmdLine.c_str() ; // this is only one string..
// i need
to find a way to pass multiple strings.I'm not even sure if this is correct
for one string
FrmMain->OleObject->OleFunction(&olecmd.parray) ; // this would be
FrmMain->OleObject->OleFunction("string one", "string two", "string three")
// if it didn't need that tagSAFEARRAY** ...
I prolly got it all wrong. I never used any activex in bcb before :p