(runtime is optionally included for those that don't have VFP9)
Includes examples of how to use this remarkable class from Calvin Hsia.
Adding your own code - Gotchas:
1.) If you're getting a COM error message, your code
may not be properly setup to run as a thread. Try it several times making sure you've recompiled and closed all tables. If it still doesn't work, the best thing to do is to use the two existing examples (MyThreadFunc.prg and backprint.prg) as a template for your own thread code and try again. *** Important: if you get stuck with a scrolling message saying "waiting for threads in Destroy....", just press the <ESC> key to exit.***
2.) Normal error messages will come from your thread code and have the line number of the error as well as a descriptive message.
3.) 'File access denied' errors in your thread code - make sure all tables are opened Shared explicitly.
Deployment Notes for a new project using this class:
Just copy over your new application folder that uses the thread class. The only other things you need to do are:
1.) regsvr32 T1.dll (the vfp thread server mtdll)
2.) regsvr32 printserver.exe (if you are doing background printing)
IMPORTANTPut your new code to be threaded in MyThreadFunc where it says:
- *main thread code
- Leave all the other code above and below this section alone.
--
DonationsDonations are accepted.
Click here to donate to help support MTmyVFP and Open Source VFP projects.Thank you for your support!