Solid File System

Virtual file system enigne that can be embedded into your software.

SolFSStorage.WideCharToUnicode method


Pascal    Plain C    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

SolFSStorage     See also    


Converts text in UTF-16 to UCS-4 encoding (full Unicode)

Not applicable


not implemented;

[Plain C]
    long _stdcall StorageWideCharToUnicode( PWideChar Src, PUnicodeChar *Buffer, LongWord *BufferSize, Bool AllocateBuffer );

[C++ (DLL/Lib)]
not implemented;

[C++ (VCL)]
not implemented;

[C++ (.NET)]
not implemented;

not implemented;

not implemented;

    not applicable;


  • 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

Return value

     [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 UTF-16 encoding used by SolFS to UCS-4 encoding (full Unicode).

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.

See also

FreeBuffer     UnicodeToWideChar    

Back to top