Wiki Home

Multi Threaded VFP


Namespace: WIN_COM_API
Describe creating and using multithreaded DLLs with VFP
I'm afraid I don't know enough about this subject to write anything here, but I did want to start a place to talk about it.

Is there any way to take advantage of multithreading within VFP? Or does it only work when you build an OLE server DLL with VFP? Can you build a multithreaded server with vfp, then call that dll from another vfp application? Are there benefits/problems with this method? (I think one is the inability to pass cursors through the OLE barrier)
- ?wgcs

VFP doesn't really do multithreading. It does Apartment Model Threading running under MTS or COM+ in Windows2000. -- Craig Berntson

I found it interesting that the MSDN (Oct99) article about the BUILD MTDLL command (http://msdn.microsoft.com/library/devprods/vs6/vfoxpro/foxhelp/newwhats_new_in_visual_foxpro60.htm) has a "link" in it that looks like this:
For details see, MTDLL Support
Underlined and all, but it's not a link! It's just underlined text. Where can we learn more about what we can do with MTDLL? -- ?wgcs

@wgcs Google. --AlanBourke

You can use COM to create objects that run VFP task in separate threads and report back the result to the main VFP application thread. The drawback is that the VFP task must be ecapsulated in a VFP MT DLL.
I created a simple COM object that does exactly this and could be further refined.
http://www.geocities.com/SiliconValley/Hills/9119/multithreaded_vfp.htm
RemusRusanu
YES!! Calvin Hsia (lead Microsoft VFP developer) has written a VFP class for multi-threading expanded upon here:
http://mtmyvfp.codeplex.com
Here are his original blogs on the class:
See also Multi Threaded DLL Parallel Fox
Category C _ O _ M Category Parallel Processing
( Topic last updated: 2019.01.17 05:07:16 AM )