LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

convert C string in to BSTR with CA_CStringToBSTR()

I want to convert C string in to BSTR format with function CA_CStringToBSTR.

I call an ActiveX function. In this function is CA_CStringToBSTR called.

 

------------ActiveX Function ---------------------

HRESULT state;

char buf[50]="0.0";

BSTR bstr=0;

 

state = CA_CStringToBSTR(buf, &bstr);

.....

.....

return ......;(0x80070057 error code "Wrong parameter")

-----------------------------------

___________________________________

Debuger after this Fun gives me the following result: state=0, bstr=0xXXXX(48)(No size Info)   [48=0x30='0']

Then I get error from this ActiveX function. I think the problem is here with this CA-CStrng..... Function.

Is that correct, what does this function? 

 

 

 

 

 

 

0 Kudos
Message 1 of 1
(3,036 Views)