CAsyncSocket in Win32 Konsole bringt Fehler...
Von: , Frage gestellt am Mo, 5. Feb 2001
Hallo!
Wollte ein Client unter VC++ 5.0 schreiben und das als KonsolenProgramm. Leider schaffe ich es einfach nicht CAsyncSocket richtig zu initialisieren. Schaut euch mal diesen Quellcode an:
//**************************************
#include <fstream.h>
#include <afxsock.h>
//***********************************
class CMySocket : public CAsyncSocket
{
public:
CMySocket () {};
~CMySocket () {};
};
int main()
{
//
CMySocket mSocket;
AfxSocketInit();
if (mSocket.Create())
cout<<"Create --> SUCCESSFULL!\n";
else
cout<<"Create --> NOT SUCCESSFULL!\n";
if (mSocket.Connect("127.0.0.1", 4000))
cout<<"Connect --> SUCCESSFULL!\n";
else
cout<<"Connect --> NOT SUCCESSFULL!\n";
return 0;
}
//*********************************************************
Ich habe bereits im Projekt->Einstellungen die MFC als "shared used DLL" eingestellt.
Was mache ich da falsch???
Bin dankbar für jeden kleinen Hinweis!
Ciao
Catmad
