I'm utterly frustrated trying to debug this test program. No matter what
I do, it throws an error. The code follows below as does the error
message. Has anybody here seen this and knows what it means? P.S. I'm
quite sure that the server is not really out of connections.

use strict;
use warnings;
use Win32;
use Win32::NetAdmin;

my $pdc = '';
my $domain = '';
my @servers = ();
my $flags = 0x08 | 0x10;

# The the domain name.
unless ($domain = Win32::DomainName){die "Unable to obtain the domain
name";}

# Get the name of the primary domain controller.
unless (Win32::NetAdmin::GetDomainController('', $domain, $pdc))
    {die "Unable to obtain the PDC name for $domain.";}

# Fill the array @servers with the names of all servers.
unless (Win32::NetAdmin::GetServers($pdc, $domain, $flags, \@servers))
{
  print("Unable to query for domain controllers: ",
    Win32::FormatMessage(Win32::NetAdmin::GetError()), ".\n");
}

ERROR message is:

Unable to query for domain controllers: No more connections can be made
to this remote computer at this time because there are already as many
connections as the computer can accept.

Thanks in advance,

Barry Brevik

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to