Is it possible to create a windows service in vb6? if yes, how?
Creating a Windows Service is quite easy. Let's get started. Start Visual Studio and create a new Windows Service project in either C# or VB.NET. You find this project type under the Windows Desktop section, as shown in Figure 1.
Both are real services. Windows Services have existed for over 20 years. They start most often at system startup and run permanently. A Worker Service is also a real process, but is intended as a background service for a front-end application; it starts with the application and stops with the application.
Run uninstall batch file to uninstall the windows service ( InstallUtil /u ) Copy new DLLs from a location on build server into Install Folder (on server hosting windows services) Run install batch file to Install the windows service ( InstallUtil WIndowsService. Exe )
I've never tried it, but Desaware offer a commercial package, the NT Service Toolkit that claims to allow you to host a VB6 DLL inside a Windows Service. Desaware was founded (and I think is still owned by) VB6 guru Dan Appleman, which is a good recommendation.
Microsoft created a control to allow you to create services in VB6.
http://support.microsoft.com/default.aspx/kb/170883
http://support.microsoft.com/kb/175948/EN-US/
Yes, it works, is it the best way to create a service, no, but if VB6 is a requirement (you have a bunch of code you have to re-use), then I can state from experience that it works. We have the original control from the January 1997 MSDN, however you can easily find it on the net if need be ( http://www.google.ca/search?q=ntsvc.ocx+download )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With