Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying dialog box from FLL w/ threads locks app
Message
From
24/07/1998 16:20:02
Sanjaya Rajadhyaksha
Consindia Private Limited
Mumbai, India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Displaying dialog box from FLL w/ threads locks app
Miscellaneous
Thread ID:
00121186
Message ID:
00121186
Views:
96
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
Next
Reply
Map
View

Click here to load this message in the networking platform