|
-
March 31st, 1999, 06:52 AM
#1
NTService and CAyncsocket
Hi,
I have a problem with my NTService and using CAsyncsocket.
My service shall wait for an incoming connection. This happens :-) but when I want to accept that incoming call nothing more happens.
I have this code as MFC only and there it works very well. So what is the problem?
Thanx in advance
-
April 8th, 1999, 04:43 PM
#2
Re: NTService and CAyncsocket
Service is a console applicattion and it cann't process messages generated by CAsyncSocket object. So you must insert something like this in service's main function:
while(WaitForSingleObject(hStop, 100)){ //wait for stop event (stop service)
if(HIWORD(GetQueueStatus(QS_ALLEVENTS))!=0){
GetMessage(&Msg, NULL,0,0);
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|