Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timers don't work in DLLs
Message
From
06/09/2010 18:46:31
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01480101
Message ID:
01480352
Views:
98
Hi Rick,

I am using a timer with EXE servers to run code asynchronously in ParallelFox (http://vfpx.codeplex.com/wikipage?title=ParallelFox). This is working well, but I would also like to support in-process DLLs. Just last week, I found Christof's DMULT.DLL, which allows you to create threads in a VFP client to call methods in a MTDLL asynchronously, but it would require some modification for my needs. C++ is not even close to my area of expertise, so I wanted to confirm timers indeed would not work in DLLs. I'll look into external/ActiveX timers first, but if those don't work out, I'll have to dig into Christof's C++ code.

Thanks.

>Hi Joel,
>
>DLL servers have no wait states. Since they don't officially support forms and controls (although you can actually run them) timers don't work inside of DLLs. DLL functions are meant to be transactional and not maintain state the way a regular VFP EXE does.
>
>You can get around this by using EXE servers which DO support timers (I use them in Web Connection for background cleanup tasks for example).
>
>The other alternative might be to use some sort of ActiveX timer which doesn't require form/window handles to run. If you search you might be able to find something that does this for you.
>
>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.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform