lrc_save_BSTR1

Type Conversion From String

Saves a BSTR string which may include nulls to a parameter.

int lrc_save_BSTR1( const char* param_name, BSTR str );
param_nameThe parameter name. To use, change the recorded string to a meaningful name.
strA string of type BSTR.

The lrc_save_BSTR1 function saves the BSTR str to the parameter param_name.

Return Values

lrc Return Values

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

In the following example, a BSTR type string, str1, is created and then saved as "str_param".

Copy code
BSTR str1 = lrc_BSTR1("abc\x00def\x00\x00ghi", 12), str2;
lrc_save_BSTR1("str_param", str1);
str2 = lrc_BSTR1("<str_param>", 12); /* str2 passed to COM API call */