public static extern IntPtr CreateService ( IntPtr hSCManager, string lpServiceName, string lpDisplayName, dwDesiredAccess desiredAccess, dwServiceType serviceType, dwStartType startType, dwErrorControl errorControl, string lpBinaryPathName, string lpLoadOrderGroup, IntPtr lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword );
public static extern SafeFileHandle CreateFile(string lpFileName, dwDesiredAccess dwDesiredAccess, dwShareMode dwShareMode, SECURITY_ATTRIBUTES lpSecurityAttributes, dwCreationDisposition dwCreationDisposition, dwFlagsAndAttributes dwFlagsAndAttributes, IntPtr hTemplateFile);
public static extern IntPtr CreateFile(string lpFileName, dwDesiredAccess dwDesiredAccess, dwShareMode dwShareMode, int lpSecurityAttributes, dwCreationDisposion dwCreationDisposion, int dwFlagsAndAttributes, IntPtr hTemplateFile);
public static extern IntPtr OpenService(IntPtr hSCManager, string lpServiceName, dwDesiredAccess desiredAccess);