Click here to Skip to main content
15,912,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMessage lost when sending to split windows Pin
mike-o28-Sep-04 6:03
mike-o28-Sep-04 6:03 
GeneralRe: Message lost when sending to split windows Pin
Sujan Christo28-Sep-04 19:40
Sujan Christo28-Sep-04 19:40 
GeneralCustom Shell handler Pin
Jim Crafton28-Sep-04 6:00
Jim Crafton28-Sep-04 6:00 
GeneralRe: Custom Shell handler Pin
David Crow28-Sep-04 9:54
David Crow28-Sep-04 9:54 
QuestionHow to change menu item propeties ? Pin
zakarias28-Sep-04 5:22
zakarias28-Sep-04 5:22 
AnswerRe: How to change menu item propeties ? Pin
Antony M Kancidrowski28-Sep-04 6:10
Antony M Kancidrowski28-Sep-04 6:10 
GeneralTerminating a Thread Pin
sweep12328-Sep-04 4:34
sweep12328-Sep-04 4:34 
GeneralRe: Terminating a Thread Pin
Blake Miller28-Sep-04 4:49
Blake Miller28-Sep-04 4:49 
Seems to me you should be using an asynchronous 'unblocked' socket. Your thread should wait on an exit event and a socket event (2 events) with WaitForMultipleObejct, and only issue the socket read if socket data is ready. Otherwisee you WILL just sit there until data arrives.

See WSAEventSelect:
"As in the case of the select and WSAAsyncSelect functions, WSAEventSelect will frequently be used to determine when a data transfer operation (send or recv) can be issued with the expectation of immediate success. Nevertheless, a robust application must be prepared for the possibility that the event object is set and it issues a Windows Sockets call that returns WSAEWOULDBLOCK immediately. For example, the following sequence of operations is possible:"

Then, your application main thread can set the event for the thread to exit, and it should not be otherwise 'blocked' waiting for data reception on the socket.

GeneralRe: Terminating a Thread Pin
sweep12328-Sep-04 6:11
sweep12328-Sep-04 6:11 
GeneralRe: Terminating a Thread Pin
Blake Miller28-Sep-04 6:28
Blake Miller28-Sep-04 6:28 
Questiondoc/view ??? Pin
Plons28-Sep-04 4:08
Plons28-Sep-04 4:08 
AnswerRe: doc/view ??? Pin
HENDRIK R28-Sep-04 4:55
HENDRIK R28-Sep-04 4:55 
AnswerRe: doc/view ??? Pin
David Crow28-Sep-04 5:43
David Crow28-Sep-04 5:43 
GeneralHandle of the View Pin
Neelesh K J Jain28-Sep-04 4:06
Neelesh K J Jain28-Sep-04 4:06 
GeneralRe: Handle of the View Pin
David Crow28-Sep-04 5:51
David Crow28-Sep-04 5:51 
GeneralRe: Handle of the View Pin
Sujan Christo28-Sep-04 8:57
Sujan Christo28-Sep-04 8:57 
GeneralPrinting help! Pin
Larsson28-Sep-04 3:37
Larsson28-Sep-04 3:37 
GeneralRe: Printing help! Pin
Andrzej Markowski3-Oct-04 14:23
Andrzej Markowski3-Oct-04 14:23 
GeneralImage Processing Pin
Fonzo28-Sep-04 3:25
Fonzo28-Sep-04 3:25 
GeneralHidden my Application in tag list Pin
Gledston Reis28-Sep-04 3:02
sussGledston Reis28-Sep-04 3:02 
GeneralRe: Hidden my Application in tag list Pin
David Crow28-Sep-04 7:29
David Crow28-Sep-04 7:29 
GeneralRe: Hidden my Application in tag list Pin
PJ Arends28-Sep-04 13:12
professionalPJ Arends28-Sep-04 13:12 
GeneralRe: Hidden my Application in tag list Pin
David Crow29-Sep-04 2:53
David Crow29-Sep-04 2:53 
GeneralRe: Hidden my Application in tag list Pin
Gledston Reis29-Sep-04 8:47
sussGledston Reis29-Sep-04 8:47 
GeneralCD rom Context menu Pin
anandforu28-Sep-04 2:50
anandforu28-Sep-04 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.