Variant Array are the right way to holt different UNICODE Strings.
On Jun 11, 11:22 pm, "SaranG(Saravanan)" <infosar...@gmail.com> wrote:
Hi all, I am using ATL Web Services now. And want to return array of
strings, i heard that BSTR array will do this. But i don't know how to
return the BSTR Array. i try with basics, if i returns in the client
it have only one value .( that is 0th index value of BSTR array). The
snap code is below,
[soap_method]
HRESULT ArrayCheck(BSTR *bstrOutput)
{
/*BSTR bstrOP[3];
bstrOP[0] = L"One";
bstrOP[1] = L"TWO";
bstrOP[2] = L"Three";
bstrOutput = bstrOP;*/
bstrOutput[0] = L"Start";
bstrOutput[1] = L"Stop";
bstrOutput[2] = L"Close";
return S_OK;
}
but the return bstrOutput has only "Start" value.
Can any one helps me .
Thanks in advance,
Saran.
Hi Karsten,
Thanks for valuable reply, i put the CComVariant as an parameter to
the Web Service function i got the following error
"error C2338: soap_method Atl Attribute Provider : error ATL2217:
Cannot process "CComVariant": SOAP methods that have parameters with
base classes are not supported in this version."
[soap_method]
HRESULT TestArray(CComVariant* coVar)
{
// functions
return S_OK;
}
Thanks in advance,
SaranG