Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   conversion of CString to LPWSTR (http://www.go4expert.com/forums/conversion-cstring-lpwstr-t9373/)

rinuvc 16Mar2008 10:19

conversion of CString to LPWSTR
every body i have got a problem in my application.

i need to convert CString to LPWSTR

i have tried the code below but its not working

CString m_StructureDetails = _T("this is a CString ");

int len = m_StructureDetails.GetLength();
LPSTR structValue = LPSTR( m_StructureDetails.GetBuffer(len));

as well as this


LPWSTR structureValues = A2W(m_StructureDetails);

Can any body help me ...

thanks in advance..

All times are GMT +5.5. The time now is 19:03.