Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Application as a Service

Status
Not open for further replies.

cstrong

MIS
Dec 18, 2000
22
0
0
GB
Hello,

How would I go about creating a VB app, that can start as a service within Windows NT?

Would this app be able to have forms??

Thanks
Clive
 
It is tricky (and unreliable) to try and do all the hard work yourself. Fortunately you don't have to.

There are a couple of utilities in the NT Resource Kit that allow you to run any EXE as an NT service. There is some vaguely fiddly configuration work that you have to do to get this working properly.

Or you can use a little OCX that Microsoft produced some time ago specifically for VB called NTSVC.OCX. Microsoft seem to have hidden this file on their site, so here are some links that should help:


 
I've used the NTSVC.OCX, and here's some tips:

1) It's unsupported code -- don't call Microsoft if you have any problems

2) Don't attempt to debug the service code - VB will GPF on you. Set your breakpoints some point after the service code.

You may want to contact Desaware, they sell a product that does this (you'll be able to get support if you have questions).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top