Create a Service from VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anybody have sample code to create a service from VB.NET?

I have gotten this far:
declare function OpenSCManager & CreateService in "advapi32.dll"
Ohandle = OpenSCManager(...
SHandle = CreateService(...
error = GetLasError( )

I am getting an "ERROR 126 The specified module could not be found."

I' not sure what "specified module" this error is pointing to???

Help????
 
Your GetLastError is wrong

Imports System.Runtime.InteropServices

Marshal.GetLastError

Here's some service articles for you:

http://support.microsoft.com/default.aspx?scid=kb;en-us;821794

http://support.microsoft.com/default.aspx?scid=kb;en-us;301273

http://support.microsoft.com/default.aspx?scid=kb;en-us;317421

http://abstractvb.com/code.asp?A=1082

http://www.devarticles.com/c/a/VB.Net/Creating-A-Windows-Service-in-VB.NET/

The above are a few . Just search Google to find thousands more

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top