Home | Overview | How Do I | Sample
This article and two companion articles explain several issues in Windows Sockets programming. This article covers converting strings. The other issues are covered in the articles: Windows Sockets: Blocking and Windows Sockets: Byte Ordering.
If you use or derive from class CAsyncSocket, you will need to manage these issues yourself. If you use or derive from class CSocket, MFC manages them for you.
If you communicate between applications that use strings stored in different wide-character formats, such as Unicode or multibyte character sets (MBCS), or between one of these and an application using ANSI character strings, you must manage the conversions yourself under CAsyncSocket. The CArchive object used with a CSocket object manages this conversion for you via the capabilities of class CString. For more information, see the Windows Sockets specification, located in the Win32 SDK.