Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run 2 processes simultaneously?
Message
De
20/08/1999 19:54:32
 
 
À
20/08/1999 11:49:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00255462
Message ID:
00256120
Vues:
25
>It would be OK, if both processes share the time slices of one CPU.
>The important part is, that one proccess uses CommTools to make communication via the serial ports. If have a few loops for retry in that procedure. Sometimes the program has to go through all the loops to complete the procedure and during that time I have a hour glass on the screen and the user can not make any entries.
> What can I do to avoid this?
>

I don't know about CommTools, but with VFP5 and VFP6, you can attach VFP code to the events of an ActiveX control using VFPCOM (download from msdn.microsoft.com/vfoxpro/downloads). I've used it succesfully to attach code to the MSCOMM32 control's OnComm event to service low-speed, intermittent serial devices without having to continuously poll in a VFP application.

You're going to find it much easier in all probability to run two separate sessions of VFP, one of which handles servicing the comm stuff using CommTools, and setting up a semaphoring system that can be intermittently polled by another VFP session. The semaphoring mechanism is nothing more than something visible to both VFP sessions that will allow the process servicing the serial port to let the other VFP session know that it has work for it to do. You could use a shared file 9add a record to indicate that somethign needs to be done, and delete it when the job is finished) or you could use a more sophisticated mechanism like MSMQ (an inter-process message API for sending esages between programs.)

>Thanks in advance
>Angela
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
Répondre
Fil
Voir

Click here to load this message in the networking platform