Re: Auto dialing and Win32::RASE

2006-03-29 Thread Sisyphus

- Original Message - 
From: "Jon Bjornstad" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, March 29, 2006 4:48 PM
Subject: Auto dialing and Win32::RASE


> Hello All,
>
> I have a handicapped user who does not have DSL access
> and has to use a dial up connection.
>
> I'd like to make it easy for her to connect only
> when needed.   CPAN has Win32::RASE and
> I've tried using this call:
>
>unless ( $hrasconn = (RasEnumConnections())[1] ) {
>   print "Dialing sequence not started\n";
>

I think that tells you whether or not you're connected. (It's not something
you do to make a connection.) When I used this module I had this:

(my $entry, my $hrasconn) = RasEnumConnections();
if ($hrasconn) {print "Already connected to $entry\n"}

To actually connect I had something like:

my @conn = RasEnumEntries();
# Assuming I want to connect to $conn[0]:
(my $user, my $pass) = RasGetUserPwd($conn[0]);
print "Dialing...\n";
$hrasconn = RasDial($conn[0],undef,$user,$pass)
if(defined($hrasconn)) { print "Connected\n"}
else {print "Not Connected\n"}

I *think* Win32::RASE has been superceded by something else ... but I'm not
altogether sure. In any case, afaik, Win32::RASE should still be functional.

Hope this helps.

Cheers,
Rob

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


Auto dialing and Win32::RASE

2006-03-28 Thread Jon Bjornstad

Hello All,

I have a handicapped user who does not have DSL access
and has to use a dial up connection.

I'd like to make it easy for her to connect only
when needed.   CPAN has Win32::RASE and
I've tried using this call:

  unless ( $hrasconn = (RasEnumConnections())[1] ) {
 print "Dialing sequence not started\n";

  } elsif ( ($ip, $server_ip) = RasGetProjectionInfo( $hrasconn ) ) {
 print "LOCAL:$ip  SERVER:$server_ip\n";

  } elsif ( Win32::RASE::GetLastError == 731 ) {
 print "Protocol not configured yet\n";

  } else {
 die Win32::RASE::FormatMessage();
  }

And all I get is the error "Dialing sequence not started".

Can anyone help?

Jon

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


Re: Examples of Win32::RASE

2003-10-10 Thread gmabbutt
I've tried playing around with it myself, but it hasn't been updated since sometime in 
2000, and doesn't work with anything newer than NT 4. (a lot of functions crash on 
win2k pro for instance)

Basically the Win32 API RAS calls change between versions of Windows, so Win32::RASE 
would have to be updated to accomodate that.

Looking at the module, there are many areas that I can't figure out, such as why 
certain variables are defined the way they are, etc, and there are no internal code 
comments, so updating it myself is out of my league.

I've been playing off-and-on for a bit on other ways to control RAS on Win32, in 
particular to programatically create a new DUN connection;  my next experiment will be 
using Perl's C pre-processor functions and simply including the ras.h and other C 
header files from MinGW.

I looked at doing something similar with SWIG (importing the C header files) but 
apparently SWIG needs you manually enter typedefs again in SWIG's own format, and 
there are a whole lot of them. 

So it's an adventure :)

Glenn


> 
> From: "Michael D. Smith" <[EMAIL PROTECTED]>
> Date: 2003/10/10 Fri AM 08:50:36 EST
> To: "Perl-Win32-Users-listserv.ActiveState.com" <[EMAIL PROTECTED]>
> Subject: Examples of Win32::RASE
> 
> 
> Does anyone know of any open source examples of using Win32::RASE? I'm 
> having trouble with the "examples" included with the module.
> 
> I'm interested in dialing existing entries, not creating or changing new 
> entries.
> 
> ms
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


win32::RASE

2002-12-13 Thread lawrence.palkendo
I am currently in the process of building a war dialer.  I am using the
win32::RASE on a windows 98 SE box using standard DUN.
I am currently running into a problem with setting one of the Flags or
keeping the Flag set if I do it manually.

The Flag is under Server Types when you look at a connections
properties.  The Flag I am trying to set is "Record a log file for this
connection"
If I tell win32::RASE to keepOldFlags it still unchecks this box and I
couldn't find any documentation on how to set this particular flag.

Any help is appreciated.

Thanks
Larry





___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Runtime Error with Win32::RASE . . .

2001-01-04 Thread Alloun, Jonathan
Title: Re: Runtime Error with Win32::RASE . . . 






Hello,


I am using the Win32::RASE module to connect via a modem to another PC.


All is working fine but occasionally the Perl program does not connect and brings back the error:


Error : Runtime exception


The RASE function that I use to connect is as follows :-


$hrasconn = RasDial($first_RAS_entry, undef , $UserName, $Password)
 or die Win32::RASE::FormatMessage;


Any ideas what is causing this error and if possible, how to eliminate this error???


Many thanks,


Jonathan





Re: Win32::RASE V.1.00 question . . . .

2000-12-08 Thread Alloun, Jonathan


Hello All,

I am new to Perl and I am trying to connect to a Windows 95 machine that is
standalone (not on a network) using the Win32::RASE module.

I have installed all the relevant modules to make Win32::RASE work.

I am using ActivePerl from ActiveState version 522.

I have deselected the check-box Log on to network off the Server Types tab
and made the username / password empty strings and even tried to place
'undef' in the place of $UserName and $Password.

This script dials the box but always asks for a username / password. The
machine is not on the network so what do I need to do so it will connect to
the Windows 95 box without asking for a username / password

Any ideas would be greatly appreciated.

Many Thanks,

Jonathan


P.S. Here is what I am working with.

>From using the example script I have this bit of code :

$|=1;

use Win32::RASE;


$first_RAS_entry = "Depot01w";
$UserName = "";
$Password = "";

#--- test of RasDial ---
print "\nI'm dialing via the RAS entry: $first_RAS_entry\n\n";

$hrasconn = RasDial($first_RAS_entry, undef , $UserName, $Password)
 or die Win32::RASE::FormatMessage;

($err, $status) = RasDial("CLICK", "DP 110-6511" , $UserName,
$Password,undef,undef)
 or die Win32::RASE::FormatMessage;

print "Connected, \$hrasconn=$hrasconn\n";
exit;


**
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users