Well it means literally what it says. Call that function first. Chances are though you are missing some step in using that class. Also most people discourage the MFC socket classes, I'd check out the winsock raw API. Also you can pass CString objects to API's requiring a LPCTSTR as it's (LPCTSTR) operator is overrode.