Inheritance: System.Runtime.InteropServices.SafeHandle
 public static extern bool ControlService(SafeServiceHandle hService, uint control, out SERVICE_STATUS serviceStatus);
 public static extern bool ChangeServiceConfig2(SafeServiceHandle handle, uint dwInfoLevel, IntPtr pInfo);
 public static extern bool CloseServiceHandle(SafeServiceHandle handle);
Example #4
0
 public static unsafe extern bool ChangeServiceConfig2(SafeServiceHandle hService, ServiceInfoLevel dwInfoLevel, void* lpInfo);
 public static extern bool ChangeServiceConfig(SafeServiceHandle handle, uint serviceType, SERVICE_START_TYPE startType, uint errorControl, string binaryPathName, string loadOrderGroup, IntPtr tagId, string dependencies, string serviceStartName, string password, string displayName);
 public static extern bool QueryServiceConfig(SafeServiceHandle handle, IntPtr pBuffer, uint bufferSize, out uint bytesNeeded);
 public static extern bool QueryServiceStatus(SafeServiceHandle handle, out SERVICE_STATUS serviceStatus);
Example #8
0
 public static extern bool QueryServiceObjectSecurity(
     SafeServiceHandle hService,
     SECURITY_INFORMATION dwSecurityInformation,
     byte[] lpSecurityDescriptor,
     int cbBufSize,
     out int pcbBytesNeeded);
Example #9
0
 public static extern bool QueryServiceStatus(SafeServiceHandle hService, ref SERVICE_STATUS dwServiceStatus);
Example #10
0
 public static extern SafeServiceHandle OpenService(SafeServiceHandle hSCManager, string lpServiceName, ACCESS_MASK dwDesiredAccess);
Example #11
0
 public static extern bool StartService(SafeServiceHandle hService, int dwNumServiceArgs, string lpServiceArgVectors);
Example #12
0
 public static extern bool DeleteService(SafeServiceHandle hService);
Example #13
0
 public static extern SafeServiceHandle CreateService(SafeServiceHandle hSCManager, string lpServiceName, string lpDisplayName, ACCESS_MASK dwDesiredAccess, ServiceType dwServiceType, ServiceStartType dwStartType, ServiceErrorControl dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup, int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword);
Example #14
0
 public static extern bool ControlService(SafeServiceHandle hService, ServiceControl dwControl, ref SERVICE_STATUS lpServiceStatus);
Example #15
0
 public static extern IntPtr LockServiceDatabase(SafeServiceHandle hSCManager);
Example #16
0
 public static extern bool SetServiceObjectSecurity(
     SafeServiceHandle hService,
     SECURITY_INFORMATION dwSecurityInformation,
     byte[] lpSecurityDescriptor);
Example #17
0
 public static extern SafeServiceHandle OpenService(SafeServiceHandle hSCManager, string serviceName, SERVICE_ACCESS_TYPE desiredAccess);
Example #18
0
 public static unsafe extern bool EnumServicesStatus(
     SafeServiceHandle hSCManager,
     ServiceType dwServiceType,
     ServiceStateQuery dwServiceState,
     byte* lpServices,
     int cbBufSize,
     ref int pcbBytesNeeded,
     ref int lpServicesReturned,
     ref int lpResumeHandle);
Example #19
0
 public static extern bool QueryServiceLockStatus(SafeServiceHandle hSCManager, IntPtr lpLockStatus, uint cbBufSize, out uint pcbBytesNeeded);
Example #20
0
 public static unsafe extern bool QueryServiceStatusEx(
     SafeServiceHandle hService,
     SC_STATUS_TYPE InfoLevel,
     void* lpBuffer,
     int cbBufSize,
     out int pcbBytesNeeded);
Example #21
0
 public static extern bool StartService(SafeServiceHandle hService, uint numArgs, string[] args);
Example #22
0
 public static extern bool ChangeServiceConfig(
     SafeServiceHandle hService,
     ServiceType dwServiceType,
     ServiceStartType dwStartType,
     ServiceErrorControl dwErrorControl,
     string lpBinaryPathName,
     string lpLoadOrderGroup,
     int lpdwTagId,
     string lpDependencies,
     string lpServiceStartName,
     string lpPassword,
     string lpDisplayName);