[DllImport("advapi32.dll", SetLastError=true)]
public static extern IntPtr LockServiceDatabase(IntPtr hSCManager);
Declare Function LockServiceDatabase Lib "advapi32.dll" (TODO) As TODO
None.
None.
Please add some!
[DllImport("advapi32.dll", SetLastError=true, CharSet = CharSet.Auto)]
public static extern IntPtr LockServiceDatabase(IntPtr hSCManager);
serviceControlManager = OpenSCManager(null, null, SC_MANAGER_ALL_ACCESS);
if (IntPtr.Zero == serviceControlManager)
{
throw new Exception("Failed to open Service Control Manager");
}
serviceDbLock = LockServiceDatabase(serviceControlManager);
if (IntPtr.Zero == serviceDbLock)
{
throw new Exception("Failed to lock the Service Control Manager");
}
Do you know one? Please contribute it!