Function ProWstringToString
Description
Converts a wide string to a multibyte character string.
NOTES:
This function accepts strings only in the active encoding of the Creo Parametric TOOLKIT application. Strings from other encodings may not be properly converted.
This function does not change the encoding of the string during the conversion.
This function replicates the performance of wstostr, which exists on some operating systems.
Each wide-string character is either 2 or 4 bytes, depending on the machine. For applications to be used in a multi-byte environment, PTC recommends providing enough memory in the "str" buffer to store 3 * the length of the "wstr" input.
Synopsis
#include <ProUtil.h>
char*
ProWstringToString
(
char* str
/* (Out)
The buffer to contain the multibyte character string. The caller must declare or allocate enough memory for this argument.
*/
wchar_t* wstr
/* (In)
The wide string, terminated by WNULL character
*/
)
Returns
The multibyte character string
Sample Code References
這是否有幫助?