473,383 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Create a Service from VB.NET

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????
Nov 21 '05 #1
1 2060
Your GetLastError is wrong

Imports System.Runtime.InteropServices

Marshal.GetLastError

Here's some service articles for you:

http://support.microsoft.com/default...b;en-us;821794

http://support.microsoft.com/default...b;en-us;301273

http://support.microsoft.com/default...b;en-us;317421

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

http://www.devarticles.com/c/a/VB.Ne...ice-in-VB.NET/

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

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
"Bob Alvarado-QC-AZ" <Bo*************@discussions.microsoft.com> wrote in
message news:EE**********************************@microsof t.com...
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????

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire...
11
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
11
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire...
6
by: Michael Tissington | last post by:
Using Visual Studio 2008 can someone point me to an example to create a cgi web service in C# ? Thanks.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.