Category Creo Parametric TOOLKIT fundamentals, Object ProString

Function ProStringToNativestring


DEPRECATED: Since Creo 3
SUPERSEDED BY: No successor will be provided.
Description
Converts a Creo Parametric UNICODE-encoded multibyte string to a native multibyte string. Use this function when you need to convert a string obtained from Creo Parametric to an external interface expecting a native-encoded multibyte string.

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

Synopsis
#include <ProUtil.h>
ProErrorProStringToNativestring(
char* result
/* (Out)
The native-encoded string. The application must provide enough memory for this output.
*/
int result_size
/* (In)
The size of the buffer supplied for conversion.
*/
char* 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