Your client side project is UNICODE. Either select MBCS in project settings, or **CStringA** sendstr; sendstr="Hello"; client.Connect ("127.0.0.1",2500); int len=sendstr.GetLength (); int sent= client.Send( **LPCSTR**(sendstr),len); CString is macro, which translates to CStringA or CStringW. You can assign either Unicode or ANSI string, CStringW/CStringA will take care of that.