Xceed Binary Encoding Library Documentation
ToString method
Xceed Binary Encoding control reference > Methods > ToString method

Description

Converts a variant byte array to a string containing only ASCII chars.

The data returned by most methods and properties is in the form of a variant byte array however in many cases, it is necessary to transfer or store the results as a string. The ToString method allows this data to be converted so it can be easily transferred or stored and then converted back to a variant byte array using the FromString method so it can be used by the appropriate method or property later on.

Parameters 

Parameter Description
vaData The variant byte array to convert.

Return value

Returns a string representing the converted byte array.

Associated properties

None

Declaration (DXceedBinaryEncoding) Copy Code
HRESULT ToString( [in] VARIANT* vaData, [out,retval] BSTR* bstrResult );
Declaration (IXceedBinaryEncoding) Copy Code

HRESULT ToString
(
  [in,size_is(dwDataSize)] BYTE* pcData, 
  [in] DWORD dwDataSize,
  [out] BSTR* pbstrResult
);

Related topics

To convert the string back to a variant byte array, the FromString method must be used.