开发者

How to pass string array as BSTR* to web service proxy

开发者 https://www.devze.com 2023-01-11 23:43 出处:网络
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.

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'}");
开发者_如何学Python

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


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

精彩评论

暂无评论...
验证码 换一张
取 消