I have a BSTR obtained from pocket outlook object model POOM get_FirstName

I want to copy the string into a char[100], how do i do that?

Thansk!

Re: BSTR to char[100] by Maarten

Maarten
Tue Nov 11 00:52:06 CST 2003

You can use the API WideCharToMultiByte to achieve this, but please note
that strings in CE are unicode, so unless this is really what you want you
might simply want to copy your BSTR simply to a TCHAR array.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

"Rally" <ralliart@hotmail.com> wrote in message
news:2uVrb.12778$Ws6.5126@edtnps84...
> I have a BSTR obtained from pocket outlook object model POOM get_FirstName
>
> I want to copy the string into a char[100], how do i do that?
>
> Thansk!
>
>



Re: BSTR to char[100] by Timothy

Timothy
Tue Nov 11 09:21:58 CST 2003

I'd suggest using one of the string classes to do the conversion to a const
TCHAR* (aka "LPCTSTR") for you. You can use _bstr_t, CString, or our free
CVOString (www.voscorp.com/ppc/dev) to do it. If you're trying to do common
code between desktop and PPC (UNICODE) you should keep in mind that a TCHAR
is not always a WCHAR as it is on the PPC, which these string classes will
manage for you.

Cheers,

Tim


"Rally" <ralliart@hotmail.com> wrote in message
news:2uVrb.12778$Ws6.5126@edtnps84...
> I have a BSTR obtained from pocket outlook object model POOM get_FirstName
>
> I want to copy the string into a char[100], how do i do that?
>
> Thansk!
>
>