#include <atlconv.h>
//// m_bstrServer
//USES_CONVERSION;
//W2A ( m_bstrServer);
////OLE2A aStrServer( m_bstrServer);
//String strServer( aStrServer);
#include <atlconv.h> // Again assuming we have wszSomeString... { char szANSIString [MAX_PATH]; USES_CONVERSION; // Declare local variable used by the macros. lstrcpy ( szANSIString, OLE2A(wszSomeString) ); }