Board index » cppbuilder » tagVARIANT parameters

tagVARIANT parameters


2004-08-23 05:51:39 PM
cppbuilder53
Hi to all, I imported a COM template library and one
component's method is like this:
HRESULT STDMETHODCALLTYPE Extract(BSTR* String/*[in,out]*/,
VARIANT* Section/*[in,out]*/,
VARIANT* Tag/*[in,out,opt]*/,
BSTR* Param4/*[out,retval]*/);
I want to pass a BSTR for the Section and Tag parameter (using
WideString class). Is there a way to do that without memory
leak???
 
 

Re:tagVARIANT parameters

Assign the values to TVariant variables and pass those in- TVariant has a
VARIANT* conversion operator built in.
Mark
"Matrix" < XXXX@XXXXX.COM >wrote in message
Quote

Hi to all, I imported a COM template library and one
component's method is like this:

HRESULT STDMETHODCALLTYPE Extract(BSTR* String/*[in,out]*/,
VARIANT* Section/*[in,out]*/,
VARIANT* Tag/*[in,out,opt]*/,
BSTR* Param4/*[out,retval]*/);

I want to pass a BSTR for the Section and Tag parameter (using
WideString class). Is there a way to do that without memory
leak???


 

Re:tagVARIANT parameters

Quote
Assign the values to TVariant variables and pass those in-
TVariant has a
VARIANT* conversion operator built in.
Can you write me an example I don't' know how to cast that
parameter. I tried:
VARIANT*(param) but it doesn't work, it gives me an error.
Surely I don't use correctly the operator.....
TIA.
 

{smallsort}