Click here to Skip to main content
16,012,759 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
Roger Stoltz29-May-07 1:35
Roger Stoltz29-May-07 1:35 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
SandipG 29-May-07 2:16
SandipG 29-May-07 2:16 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
David Crow29-May-07 3:56
David Crow29-May-07 3:56 
QuestionStrange socket problem Pin
BadKarma28-May-07 23:57
BadKarma28-May-07 23:57 
AnswerRe: Strange socket problem Pin
Roger Stoltz29-May-07 3:02
Roger Stoltz29-May-07 3:02 
GeneralRe: Strange socket problem Pin
BadKarma29-May-07 4:06
BadKarma29-May-07 4:06 
GeneralRe: Strange socket problem Pin
Roger Stoltz29-May-07 4:18
Roger Stoltz29-May-07 4:18 
GeneralRe: Strange socket problem Pin
BadKarma29-May-07 4:57
BadKarma29-May-07 4:57 
Roger Stoltz wrote:
What do you mean by "broken"?
Every thread that creates a socket has to be a UI-thread, i.e. it has got to have a message pump. This means you must have a CWinThread derivative where the socket is a member of the class.
If you create sockets in worker threads that don't have message pumps, Chaos and Mayhem will follow.

Yep I have a CWinThread derived class CConnectionManager which creates a CListenSocket object.
CListenSocket has override the OnAccept function to accept an incoming Client. But doesn't the listen socket creates a dummy window so it can receive the message sent. Otherwise how would one make a difference between message for the thread and those for the listen socket.
I have checked and the thread message pump is still working. So maybe the Handle to identify the listen socket has gotten invalid. Is there a way to check if the listen socket can still receive mesagges.
I have another CWinthread derivative that also manages a Listen socken on another port and this keeps on working, sometimes Sigh | :sigh: . Sometimes all listen sockets keep on working, other times its only the Client Listen socket which fails, yet another time its the ohter listen socket which fails. And if i'm very lucky (NOT) both the listen sockets are being kidnapped by somekind of Gremlin. AArrgh !! Mad | :mad:
I'm getting crazy with this issue. I mean the network of another pc fails. Resulting in a database connection loss. But my listen socket go down OMG | :OMG:

codito ergo sum

GeneralRe: Strange socket problem Pin
Roger Stoltz29-May-07 5:34
Roger Stoltz29-May-07 5:34 
GeneralRe: Strange socket problem Pin
Moak28-Jun-07 5:52
Moak28-Jun-07 5:52 
Question#$%%^^% EVC++! - why bitmap won't save? Pin
charlieg28-May-07 23:56
charlieg28-May-07 23:56 
AnswerRe: #$%%^^% EVC++! - why bitmap won't save? Pin
Nelek29-May-07 1:28
protectorNelek29-May-07 1:28 
QuestionWhy dialog doesn't repond to tab key Pin
LiYS28-May-07 23:38
LiYS28-May-07 23:38 
AnswerRe: Why dialog doesn't repond to tab key Pin
nitin328-May-07 23:46
nitin328-May-07 23:46 
AnswerRe: Why dialog doesn't repond to tab key Pin
Hamid_RT29-May-07 0:08
Hamid_RT29-May-07 0:08 
GeneralRe: Why dialog doesn't repond to tab key Pin
Rajesh R Subramanian29-May-07 4:01
professionalRajesh R Subramanian29-May-07 4:01 
Questionmemory heap problem Pin
Moonis Ahmed28-May-07 23:27
Moonis Ahmed28-May-07 23:27 
AnswerRe: memory heap problem Pin
Roger Stoltz28-May-07 23:40
Roger Stoltz28-May-07 23:40 
AnswerRe: memory heap problem Pin
Matthew Faithfull28-May-07 23:48
Matthew Faithfull28-May-07 23:48 
AnswerRe: memory heap problem Pin
Stephen Hewitt29-May-07 14:01
Stephen Hewitt29-May-07 14:01 
Questionvideo streaming Pin
tyagineha28-May-07 23:13
tyagineha28-May-07 23:13 
AnswerRe: video streaming Pin
Roger Stoltz28-May-07 23:34
Roger Stoltz28-May-07 23:34 
AnswerRe: video streaming [modified] Pin
Amar Sutar28-May-07 23:55
Amar Sutar28-May-07 23:55 
QuestionRe: video streaming Pin
tyagineha29-May-07 0:46
tyagineha29-May-07 0:46 
QuestionDetecting the end of the file Pin
Aint28-May-07 23:01
Aint28-May-07 23:01 

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.