Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6.0 & dual processor s
Message
De
21/09/2000 22:38:52
 
 
À
21/09/2000 17:05:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00419223
Message ID:
00419497
Vues:
22
>Is there any way that a VFP app can be designed to take advantage (i.e. multiple instances ala C++)of a multi-processor machine.

Sure - fire two different VFP apps, or separate instances of and run them in parallel. There are any number of methods that VFP can use to synchronize processes and exchange states; as simple as a shared DBF with a record per instance of VFP running, and a list of pending tasks assumed by running instances. The OS versions that support multiprocessor architectures (NT and Win2K) report the number of SMP processors, and you can (at your own risk) use SetProcessAffinityMask() to make a given process run on a particular processor or subset of processors given the current system configuration. There are a number of process synchrnization and IPC mechanisms available via COM or the Win32API; mutexes, events, mailslots, memory-mapped files and named pipes are all implementable using just VFP and the API, with varying degrees of difficulty, and MSMQ is available through COM with VFP6 - in fact, there is a detailed whitepaper on the MSDN site that presents a detailed example of a VFP system implemented using MSMQ
Using MSMQ with Microsoft Visual FoxPro 6.0
Randy Brown
Microsoft Corporation

September 1999

Summary: This article guides Visual FoxPro® developers through successfully writing Visual FoxPro code to access the Microsoft® Messaging Queue (MSMQ) COM objects directly. Many tips and tricks specific to Visual FoxPro are scattered throughout the code samples. (33 printed pages)
George Tasker has posted code in the Files section that uses MUTEXES to implement single-use applications, there are new SYS() functions to delimit critical sections of code so that COM MTDLLs and other situations where guarenteeing only a single instance of an app is running; I've posted code that can be used to do much the same thing, or ensure that one app is already loaded and running as a prerequisite for using dependent programs, or allowing the app to start the prerequisite app and wait until it's working based on the Event object. I've a class in testing which presents more of the event's synchronization. Lots of the Windows API synchronization tools may be used without resorting to C++.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform