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:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.