I am trying to install and run a service using Visual Basic 6. I receive a handle to the SCM after executing the function OpenSCManager. I then try to install the service by using the function CreateService. At this point the program returns a 0 to indicate that it has an error and has not returned a handle. The code at that point is as follows:
schService = CreateService( _
schOpenSCM, _
lpServiceName, _
lpDisplayName, _
SERVICE_ALL_ACCESS, _
SERVICE_WIN32_OWN_PROCESS, _
SERVICE_AUTO_START, _
SERVICE_ERROR_IGNORE, _
lpszBinaryPathName, _
vbNullString, _
vbNull, _
vbNullString, _
vbNullString, _
vbNullString)
I receive the error message from Err.LastDllError of 87.
Any ideas?
Mountie
schService = CreateService( _
schOpenSCM, _
lpServiceName, _
lpDisplayName, _
SERVICE_ALL_ACCESS, _
SERVICE_WIN32_OWN_PROCESS, _
SERVICE_AUTO_START, _
SERVICE_ERROR_IGNORE, _
lpszBinaryPathName, _
vbNullString, _
vbNull, _
vbNullString, _
vbNullString, _
vbNullString)
I receive the error message from Err.LastDllError of 87.
Any ideas?
Mountie