Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timers don't work in DLLs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01480101
Message ID:
01480515
Vues:
85
You can use AJAX on the page to fire these types of things automatically, but this is still suboptimal.

In Web applications you would never have state keep running a timer on the server anyway (at least not when you're using MTDLLs) because there's no persistant instance running every. instances are created and destroyed so there is no state and nothing to fire a new timer event into. And you certainly don't want to keep a VFP instance active inside of IIS or other Web Server just to do this. In stateless environments like a Web Server background tasks are rarely a good idea.

Background tasks that need to be running on a timer schedule inside of VFP (or even in multi-threaded environments like .NET) are often better served by a daemon process that runs in the background and handles this independent of the main application. It separates the application concerns and minimizes concurrency issues and the possible crashes associated with them IMHO.

+++ Rick ---

>Let's say you had an auction type web application (like Ebay) built with a vfp mtdll. To make it simple, it would be nice if the application knew to fire off periodically the results of auctions or warnings of being outbid. I've seen php applications do this by requiring a user to hit the page and then checking some variable. But that seems pretty lame and too dependent on user input. There are undoubtedly other ways to accomplish this even with an mtdll but keeping all of the application in a vfp mtdll keeps it all in a nice tidy package.
>>>But frankly why do you need timers inside of a DLL server? If you're calling from just about any other environment than Fox it's likely to have >>timer functionality natively on that platform. Let the client platform handle the timer firing and pass the processing off to VFP from there...
>
>>>+++ Rick ---
>
>>As far as I can tell, timers do not fire inside VFP DLLs (single or multi-threaded). Can anyone confirm that is the case? Or if there is a way to get them working, let me know.
>>
>>Thanks.
+++ 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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform