Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7: Run as a service
Message
 
To
24/08/2002 19:35:47
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00693355
Message ID:
00702911
Views:
15
Please, please, please check out the Dart Service tool. It is awesome! It is an ActiveX control that works flawlessly with VFP7. With a few lines of code you get a real service, no pain like with SRVANY. Dart's (free) support is not that great unless you are doing VB6, but there is actually very little you have to do to make your .exe a service, so their weak support isn't that big a deal.

www.dart.com




>Hi,
>
>I'm looking for resources to help me design a VFP app that will run as a Windows NT/2000 service. I found the UT FAQ, but it is several years old and doesn't provide any info on how the app should be designed. Ideally, I'd like to find a UT/FoxPro Advisor/FoxTalk article that provides an example of how to do this.
>
>Here's what I want the VFP7 app/service to do:
>
>1. Run 24x7
>2. Periodicly, read a VFP table used by another app, and check certain criteria. If the criteria are met, do the following:
> a. Send a windows broadcast msg
> b. Send an EMail
>
>I know that a Windows service cannot have any UI. I have these questions:
>
>1. How to I code the VFP app/service to respond gracefully to a Windows stop service command?
>
>2. According to MS KB article Q175948, MS states that it is NOT a good idea to run a VB app as a service. Here's a quote from the article:
>
>========================================
>Microsoft does not currently recommend, and does not support, running Visual Basic applications as Microsoft Windows NT, Windows 2000 and Windows XP Services because the applications may exhibit unstable behavior when installed and run as Microsoft Windows Services. Microsoft Visual Basic 4.0 does not support callbacks nor is Visual Basic 4.0 thread-safe. While Visual Basic 5.0 and 6.0 is apartment-model thread-safe, there is no way to marshal calls back into a Visual Basic program through the AddressOf operator. This behavior is by design.
>=========================================
>
> Do any of the same concerns/issues apply to VFP7?
>
>TIA.
Previous
Reply
Map
View

Click here to load this message in the networking platform