Your code as shown is incomplete.
At the very minimum you should have :
use Win32::RasAdmin;
$RASServer = "RASservername" ;
if (Win32::RasAdmin::ServerGetInfo("\\\\$RASServer", \%Hash)){
print "success:\n";
DumpHash(%Hash);
print "\n" ;
}else{
print "fail.\n";
}
sub DumpHash{
my (%temp) = @_;
foreach $Temp (sort (keys (%temp))){
print "\t$Temp = $temp{$Temp}\n";
}
}
Check Dave Roth's site about RasAdmin.
http://www.roth.net/
While you're there, check out his two excellent books about Perl for Win32
admin.
The site has the full RasAdmin_Test.pl script which works nicely. It is
available at the below link :
ftp://ftp.roth.net/pub/ntperl/rasadmin/
> -----Original Message-----
> From: Xavier Calatrava [SMTP:[EMAIL PROTECTED]]
> Sent: 27 April 2001 10:05
> To: [EMAIL PROTECTED]
> Subject: Problems with RasAdmin module
>
> Hi all!
> When I execute the code
>
> use Win32::RasAdmin;
>
> if (Win32::RasAdmin::ServerGetInfo($RASServer, \%Hash)){
> print "success:\n";
> DumpHash(%Hash);
> }else{
> print "fail.\n";
> }
>
> I get
>
> Time (in msec) for CallNamedPipe to complete: 250
> Time (in msec) for CallNamedPipe to complete: 251
> fail.
>
> I got the same result for all the functions in this module. I'm using
> WinNT4
> workstation sp6a with perl AS5.22.
>
> Any ideas?
>
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin