Original Post
Hi everyone, i didn''t knwo where to post a question about UNICODE format so I posted there...
So here''s my problem:
I need to developp a application using COM interfaces and these are currently using an UNICODE string format (used to give filenames for examples); this format uses 2 bytes for a character (standard string are [char] coded so it''s only 1 byte).
I have so troubles using this format as i use standard C functions to managed all my strings (strcpy, strcmp.. aand all str___() functs, fopen, fclose, fprintf, fwrite and fread for files...).
How can we "convert" a simple [char*] string to a [unsigned short*] one (the unicode string format) WITHOUT LOSS OF VALIDTY
I have tried a (barbarian
) convertion (with casting) but he didn''t keep the filename valid!
So can anyone help me about that !!!
Thanks for any reply