From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function StringToWideChar(const Source: UnicodeString; Dest: PWideChar; DestSize: Integer): PWideChar;


extern DELPHI_PACKAGE WideChar * __fastcall StringToWideChar(const UnicodeString Source, WideChar * Dest, int DestSize);


Type Visibility Source Unit Parent
function public
System System


Returns a UNICODE string from an AnsiString.

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.

See Also