private static extern NtStatus SamConnect(UnicodeString serverName, out IntPtr serverHandle, ServerAccessMask desiredAccess, IntPtr objectAttributes);
public SamServer(ServerAccessMask access = ServerAccessMask.SamServerEnumerateDomains | ServerAccessMask.SamServerLookupDomain) { Check(SamConnect(new UnicodeString(Name), out _handle, access, IntPtr.Zero)); }