Object ProLegacystring

Function ProLegacystringToWstring


DEPRECATED: Since Creo 3
SUPERSEDED BY: No successor will be provided.
Description
Converts a legacy-encoded multibyte string to a Creo Parametric compatible UNICODE-encoded widestring. Use this function when you have a multibyte string from a file written by or for any release of Pro/ENGINEER older than Wildfire 4.0 that needs to sent to Creo Parametric.

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

Synopsis
#include <ProUtil.h>
ProErrorProLegacystringToWstring(
wchar_t* result
/* (Out)
The UNICODE-encoded widestring. The function must supply enough memory for this result.
*/
int result_size
/* (In)
The size of the buffer supplied for conversion.
*/
char* input
/* (In)
The legacy-encoded string.
*/
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.
*/
)
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