Subj : Re: ansi (char *) to BSTR To : borland.public.cpp.borlandcpp From : Genie Date : Sat Jun 19 2004 09:53 am maeder@glue.ch (Thomas Maeder [TeamB]) wrote: >"Genie" writes: > >> Does anyone one know a safe reliable way to convert >> a ANSI (char *) string to a BSTR. > >What encoding do you want to converted string to have? I don't quite understand what you mean. This is as much as I know.... That some how i have to get char * into a unicode string and then use SysAllocString on the unicode string to convert it to a BSTR. I'm in a win32 environ and the string will be for passing to COM objects. What I am looking for is a safe way to do that without causing memory allocation problems, leaks GPFs ect. Thanks. .