hankgao0703
Programmer
Hi,
I am developing a Windows service application, in which I use CAysncSocket class as a listenning socket to monitor requests from clients, but when I call CAsynSocket.Create(), the application crashes, Why?
my code is as follows:
....
AfxSocketInit();
....
CAsyncSocket socket;
socket.Create(2047); <===== application crashes here
by the way, I made a small console application to test and same error happens, but in a dialog based appication, it works, so CAysncSocket only can be used in standard windows application, Is that right?
If so, that's too bad, I just wonder if there is any other ways to communicate with clients that can be used in Windows service application?
thanks in advance
Hank Gao
I am developing a Windows service application, in which I use CAysncSocket class as a listenning socket to monitor requests from clients, but when I call CAsynSocket.Create(), the application crashes, Why?
my code is as follows:
....
AfxSocketInit();
....
CAsyncSocket socket;
socket.Create(2047); <===== application crashes here
by the way, I made a small console application to test and same error happens, but in a dialog based appication, it works, so CAysncSocket only can be used in standard windows application, Is that right?
If so, that's too bad, I just wonder if there is any other ways to communicate with clients that can be used in Windows service application?
thanks in advance
Hank Gao