views:

21

answers:

1

In VS2005 I have generated a web reference to a web service that takes a 1-dimensional array of strings ("inputArray") as an input parameter.

The proxy function generated for this web service call asks for two parameters:

BSTR *inputArray
int inputArray_nSizeIs

What is the proper syntax for passing in inputArray as a BSTR*? Currently I'm declaring it thusly:

BSTR inputArray = SysAllocString(L"{'account_name', 'user_name', 'date_time'}");

But this is being parsed improperly when generating the SOAP response in atlsoap.h.

A: 

Answered myself after learning to suck at C++ incrementally less:

BSTR inputArray[3]; inputArray[0] = SysAllocString(L"account_name"); inputArray[1] = SysAllocString(L"user_name"); inputArray[2] = SysAllocString(L"date_time");