Here is what I have so 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." Anybody have any examples on how to do this? Help????
Bob Alvarado-QC-AZ wrote: > Here is what I have so 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." > > Anybody have any examples on how to do this? > > Help???? Well, I guess you could use Interop, and call the Win32 API directly if you prefer. Or you could check the .NET docs for the classes it provides to assist with this. Here is a walkthrough. http://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/01/12/NetServ/toc.asp also... http://samples.gotdotnet.com/QuickStart/howto/default.aspx?url=/quickstart/howto/doc/SimpleService.aspx