Hi,
I need to pass from my VI module a string to COM automation BSTR method formal parameter.
I tried to use a string array, with "Index Array ", then a simple string constant , a normal string control and so on.
In any case windows come up with a exception handler with this message in <Error Out>:
"Invalid access to memory location in ACLAM.Execute.vi"
LABView treats this type of data like a normal string, or I need something like a pointer ?
Which type of conversion have to insert for resolve my problem ?
I attached, my VI module containing the call to ::Execute(....) method of my COM.
<Execute> code:
STDMETHODIMP
CACLAM::Execute(
/*[in] */ BSTR Service, <--------- FAIL on IT !!!
/*[in,optional] */ VARIANT* Params,
/*[out,optional]*/ VARIANT* Response,
/*[out,retval] */ BOOL* RVal
)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
*RVal = FALSE ; // assume failure
TRACE( " * [ ACLAM.Execute: Service-> %s ] *\n", (LPCTSTR)*Service ) ;
try
{
{
LPCTSTR sSERVICE = gService.GetLPCTSTR( Service ) ;
if ( strcmp ( sSERVICE, "ErrorQuery" ) == 0 )
{
) ? S_OK : S_FALSE ) ;
.......
........
Can You help me?
TIA.
Giando.