DeregisterService (Compact 2013)
3/26/2014
This function stops a service instance.
Syntax
BOOL DeregisterService(
HANDLE hDevice
);
Parameters
- hDevice
[in] Handle to the service instance returned by ActivateService or the hDevice member of the DEVMGR_DEVICE_INFORMATION structure returned via a call to GetDeviceInformationByFileHandle.
Return Value
A nonzero value indicates success. A value of zero indicates failure. To get extended error information, call GetLastError.
Remarks
If the service is marked with the DEVFLAGS_NOUNLOAD flag, attempts to load it will fail.
Security Note: |
---|
DeregisterService can be called from either privileged or normal applications, regardless of the setting of the DEVFLAGS_TRUSTEDCALLERONLY registry flag for the service. If a privileged application has loaded a service, a normal application cannot unload the service. However, if a normal application has loaded the service, then either a privileged application or a normal application can unload the service. |
Requirements
Header |
service.h |
Library |
coredll.lib |
See Also
Reference
Servicesd.exe Functions
ActivateService
xxx_Deinit (Servicesd.exe)
xxx_IOControl (Servicesd.exe)
Servicesd.exe Registry Settings