Category Creo Parametric TOOLKIT fundamentals, Object ProWstring

Function ProWstringToLegacystring


DEPRECATED: Since Creo 3
SUPERSEDED BY: No successor will be provided.
Description
Converts a Creo Parametric UNICODE-encoded widestring to the legacy encoding used by Pro/ENGINEER prior to Wildfire 4.0. Use this function when you need to use a widestring obtained from Creo Parametric to a file which might need to be read by Creo Parametric or a Creo Parametric TOOLKIT application running in an older version of Pro/E.

The resulting string will always be NULL-terminated as long as the result buffer has sufficient space for this.

Synopsis
#include <ProUtil.h>
ProErrorProWstringToLegacystring(
char* result
/* (Out)
The legacy-encoded string. The application must provide enough memory for this output.
*/
int result_size
/* (In)
The size of the buffer supplied for conversion.
*/
wchar_t* input
/* (In)
The Creo Parametric widestring.
*/
int input_size
/* (In)
The size of the input widestring supplied for conversion. If this is PRO_VALUE_UNUSED, the entire input string should be converted.
*/
char out_of_encoding_char
/* (In)
The character to use when the conversion encounters an out-of-encoding character in the input.
*/
ProBoolean* out_of_encoding
/* (Out)
Flag indicating if the out-of-encoding character was used during the conversion process.
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more input arguments was invalid.
PRO_TK_LINE_TOO_LONGThe supplied input string length was too long for the available space in the result string. Only a partial conversion was performed.

Manual References:

  1. Technical Summary of Changes for Creo 4.0 F000: Support for Legacy and Native Encoding