Information générale
Catégorie:
Fonctions Windows API
Titre:
Displaying dialog box from FLL w/ threads locks app
I am trying to create a networking library for use with VFP5(on NT and 95). I need to support both connectionless(datagram) and connection-based communications.
For connectionless communication, I am using mailslots. For connection-oriented messaging I am using a named-pipe server on NT. Since Win95 doesn't support named-pipe servers I am simulating this using a mailslot( a different one from the one that I am using for datagrams ).
In order to receive datagrams, I have a timer that periodically checks the mailslot. Some datagrams require me to display the contents of the message to the user. For this, I display a modeless dialog that contains a listbox for the messages and an OK button. As more datagram messages come in, I keep adding to listbox as needed.
For connection-oriented messages I basically spawn a thread that continuously listens to the pipe(NT)/mailslot(95) and responds to messages as they come in.
The datagram processing and the dialog display works fine without the named-pipe server thread active. Even after I spawn the named-pipe server thread, both datagrams and connection-based messages are passed flawlessly.
However, whenever I have to display the modeless dialog mentioned above and the named-pipe server thread is active, the application locks up after initializing the dialog with WM_INITDIALOG. The timer's callback function checks the mailslot, initializes and displays the dialog, and then terminates normally. As soon as control leaves the timer's callback, the application locks up.
Any help will be much appreciated.
Thanks
Sanjaya
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement