[DllImport("advapi32.dll", SetLastError=true)]
static extern TODO OpenSCManager(TODO);
<DllImport("advapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Private Shared Function OpenSCManager(ByVal machineName As String, ByVal databaseName As String, ByVal desiredAccess As Int32) As IntPtr
End Function
None.
Pass in Null/Nothing for MachineName to use the local machine.
Pass in Null/nothing as the database name to use the default SERVICES_ACTIVE_DATABASE
Dim scHandle As IntPtr = OpenSCManager(Nothing, Nothing, 0)
MsgBox(scHandle.ToString)
CloseHandle(scHandle)
Do you know one? Please contribute it!