HI,
I would like to know how to convert a string type to a BSTR string type,the type Visual basic uses. Does anyone know how or done this before.Thanks a bunch!
It depends on the type of string you've already got.
If it's already a WCHAR then SysAllocString(string) will do the trick for you. If not, you've got to convert it to an OLECHAR (WCHAR) first, with for instance the MultiByte2WideChar API (can't remember the name exactly, but something like that).
Greetings,
Rick
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.