public IntPtr OpenServiceControlManager(string machineName, string databaseName, ScmAccess serviceControlManagerAccess) { var handle = OpenSCManagerW(machineName, databaseName, (uint) serviceControlManagerAccess); if (handle == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } return handle; }
public IntPtr OpenService(IntPtr serviceControlManagerHandle, string serviceName, ScmAccess serviceControlManagerAccess) { var handle = OpenService(serviceControlManagerHandle, serviceName, (uint) serviceControlManagerAccess); if (handle == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } return handle; }
public IntPtr OpenServiceControlManager(string machineName, string databaseName, ScmAccess serviceControlManagerAccess) { var handle = OpenSCManagerW(machineName, databaseName, (uint)serviceControlManagerAccess); if (handle == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } return(handle); }
public IntPtr OpenService(IntPtr serviceControlManagerHandle, string serviceName, ScmAccess serviceControlManagerAccess) { var handle = OpenService(serviceControlManagerHandle, serviceName, (uint)serviceControlManagerAccess); if (handle == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } return(handle); }
public static extern IntPtr OpenSCManager(string?machineName, string?databaseName, ScmAccess dwAccess);
private static extern IntPtr OpenSCManager( string machineName, string databaseName, ScmAccess dwDesiredAccess);