RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.StringToWideChar Function

Returns a UNICODE string from an AnsiString.

Pascal
function StringToWideChar(const Source: string; Dest: PWideChar; DestSize: Integer): PWideChar;
C++
PWideChar StringToWideChar(const AnsiString Source, PWideChar Dest, int DestSize);

System

StringToWideChar converts a string from ANSI to UNICODE and stores the result in a specified buffer. 

Source is the string to convert. It must include at most DestSize – 1 characters. 

Dest is the buffer into which StringToWideChar writes the corresponding UNICODE string. The caller allocates this memory to include at least DestSize wide characters. Following the call, Dest contains at most DestSize - 1 characters, terminated by a NULL wide character.  

DestSize is the size of the buffer Dest.  

StringToWideChar returns a pointer to Dest. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!