Click to See Complete Forum and Search --> : Sockets and consoles


hof
June 9th, 1999, 10:07 AM
I am attempting to delevop a console app ( an NT Service ) that uses CSocket. It would appear that MFC is not very happy about this. I can get around some of the problems by declaring a global instance of CWinApp and also calling AfxSetResource, but I can not get my socket to accept connections. Has anyone got an idea as to what the cause could be?

Daniel Lindh
March 2nd, 2000, 10:17 AM
I'am doing exactly the same thing now using the codeguru NTService ( http://www.codeguru.com/system/nt_service.shtml ), and I also got the connection problem. It looks like the CAsyncSocket uses some kind of CWnd to get window messages, who tells the CAsyncSocket object to execute the OnConnect, OnAccept etc...

Does anybody have example code or any Ide's how to solve this.