[DllImport("netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern uint NetValidateName( string ServerName, string Name, string Account, string Password, NETSETUP_NAME_TYPE NameType );
Microsoft documentation: Link
Last updated 1 year ago