Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Threads
Message
 
To
26/02/1999 06:53:46
Jeroen Naus
Harte-Hanks Europe
Hasselt, Belgium
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00190960
Message ID:
00193050
Views:
14
>So how do you start/stop a thread in VFP ?

You have to write a C++/etc. DLL or FLL that does it. You can creat the thread and
have an entry point function in the DLL that gets called. The thread
then executes independently of the VFP application. If you build
an FLL, you can call back into VFP from that code to force some action
to occur in your application, but you have to be very, very careful,
because VFP was not designed to be re-entrant.

There are several safe ways to do this: Build an ActiveX control that
fires events - VFP can sink the control events safely and you can write
code in response to them.

Or you can 'fake' your own events by using messages from the DLL to your
application running a polling timer. Messages can be via files or DDE or
Named Pipes... I've done the latter and it's fairly easy to do actually.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform