SYSSTR function

Purpose: SYSSTR converts any BCX or C string to a BSTR string. SYSSTR was created to provide a compatible means of communicating with Power Basic DLL's that use dynamic strings. SYSSTR is curently modeled after the BCX_TmpStr function, using a ringbuffer of 32.


Syntax:

 RetBSTR = SYSSTR(CString AS STRING  _
                [, WideChar AS BOOL] _
                 [, FreeStr AS BOOL])

Return Value:

  • Data type: BSTR
    RetBSTR The converted CString.

Parameters:

  • Data type: STRING
    CString any valid BCX or C string literal or variable.
  • Data type: BOOL
    WideChar [OPTIONAL] TRUE will return a wide string.
  • Data type: BOOL
    FreeStr [OPTIONAL] TRUE will free any remaining strings still allocated.

Remarks : Note that it is safe to return wide and short strings in the same program.


 SYSSTR("", 0, TRUE)

should be called at the end of your program to free up any strings still allocated.