Filter:Pascal Plain C C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NET Java
OPERATING SYSTEM EDITION
Converts text in UCS-4 encoding (full Unicode) to UTF-16
- Src - source text in system default encoding to be converted
- Buffer - the buffer that holds the result of conversion (see method description)
- BufferSize - size of the buffer (see method description)
- AllocateBuffer - specifies whether the new buffer must be allocated or the passed one should be used
[Plain C] 0 if the function succeeded or one of Error codes if the function failed.
This function is currently implemented only in SolFS Operating System edition for Linux, FreeBSD and MacOS X.
Use this method to convert the string from UCS-4 encoding (full Unicode) to UTF-16 encoding used by SolFS.
You can specify the existing buffer to store the result by setting AllocateBuffer parameter to false. In this case you need to pass the existing buffer in Buffer parameter and set BufferSize to the size of the buffer. On return BufferSize will contain size of the converted data including terminating null character. If the passed buffer was large enough to hold the data, the data is copied to this buffer.
Alternatively you can tell SolFS API to allocate new buffer. In this case Buffer parameter will be set to the newly allocated buffer and BufferSize will contain the size of the buffer (i.e. the size of the returned data including terminating null character). Allocated buffer must be freed using a call to FreeBuffer.