Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a windows service in vb6

Is it possible to create a windows service in vb6? if yes, how?

like image 888
ajax Avatar asked Jan 19 '10 05:01

ajax


People also ask

Can you create Windows services using VB net?

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.

What is the difference between worker service and Windows Service?

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.

How do I deploy a Windows Service to a server?

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 )


2 Answers

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.

like image 177
MarkJ Avatar answered Oct 06 '22 00:10

MarkJ


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 )

like image 25
Kris Erickson Avatar answered Oct 06 '22 01:10

Kris Erickson