Board index » Visual Studio » Conversion from ANSI to UNICODE errors
|
Kip
|
Conversion from ANSI to UNICODE errors
Visual Studio168
Can any body help to figure out why the following code generates the following errors at compile time, and also any suggestions on how to fix it? BACKGROUND INFO --HRESULT AnsiToUnicode(LPCSTR pszA, LPOLESTR* ppszW) <-- Function definition --private: CString m_saveAsFilename; <-- Private variable definition inside class --CString fullpath = GetDocument()->GetPathName(); CODE IN QUESTION -- AnsiToUnicode(m_saveAsFilename,&m_pwBuffer); -- AnsiToUnicode(fullpath,&m_pwBuffer); ERROR MESSAGED FOR BOTH FUNCTION CALLS error C2664: 'AnsiToUnicode' : cannot convert parameter 1 from 'class CString' to 'const char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Fausto - |
