Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.22 KB

File metadata and controls

49 lines (33 loc) · 1.22 KB

Home

Function name : CloseServiceHandle

Group: Service - Library: advapi32


The CloseServiceHandle function closes a handle to a service control manager or service object.


Code examples:

Encapsulating access to the Windows Services in a class
How to create a service object
How to delete a service object

Declaration:

BOOL CloseServiceHandle(
  SC_HANDLE hSCObject
);  

FoxPro declaration:

DECLARE INTEGER CloseServiceHandle IN advapi32;
	INTEGER hSCObject  

Parameters:

hSCObject [in] Handle to the service control manager object or the service object to close.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

The CloseServiceHandle function does not destroy the service control manager object referred to by the handle. A service control manager object cannot be destroyed. A service object can be destroyed by calling the DeleteService function.