[fpc-pascal] how to pass a unicode string pointer in Mac OSX

Guru Kathiresan gururamnath at yahoo.com
Mon Jan 26 08:48:24 CET 2009


Hello,

I'm wondering how to pass a unicode string to a C function in Mac. 

 

The C export function has the following definition 

 

void  function1(wchar_t *str);

 

In windows wchar_t size is 2 so I thought I can pass a WideString type
casted with PWideChar.

In Mac ,size of wchar_t is 4 in the C library and the size of WideChar in
FPC is 2.

 

In that case how do we convert the 2 byte WideChar to 4 byte wchar_t string?

 

Thanks,

Guru Kathiresan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090125/540cd4d9/attachment.html>


More information about the fpc-pascal mailing list