1. RasDial() API

..um, has anyone contributed any simple 'dial your ISP' code in any app yet?
No sense duplicating efforts, eh!

new topic     » topic index » view message » categorize

2. Re: RasDial() API

Wolf wrote:
> 
> ..um, has anyone contributed any simple 'dial your ISP' code in any app yet?
> No sense duplicating efforts, eh!
> 

not that I can recall.
You can set your web browser to dial the connection on open. 
 I know I.e. does. 
So from your program you would just need to shell open a web page.
also set the browser to timeout after a period of idle activity. 

I used that method to start a dial up connection from the task scheduler,
so it would connect every two hours, upload a picture from webcam 2000, 
then disconnect. 



--"ask about our layaway plan".
--

new topic     » goto parent     » topic index » view message » categorize

3. Re: RasDial() API

> > ..um, has anyone contributed any simple 'dial your ISP' code in any app yet?
> not that I can recall.

Yea, search returned nothing, so,
Ok, simple demo only tested on Win95/98/98SE, so feedback appreciated.
.. may be found at:
http://www.king.igs.net/~wolfritz/EuDial.zip    2 kilobytes

--please read ~lines 14, 21, and 132 before using, since some setup required.

new topic     » goto parent     » topic index » view message » categorize

4. Re: RasDial() API

Wolf wrote:

>>> ..um, has anyone contributed any simple 'dial your ISP' code in any app yet?
>> not that I can recall.
>
> Yea, search returned nothing, so,
> Ok, simple demo only tested on Win95/98/98SE, so feedback appreciated.
> .. may be found at:
> http://www.king.igs.net/~wolfritz/EuDial.zip    2 kilobytes
>
> --please read ~lines 14, 21, and 132 before using, since some setup required.

Worked fine for me on Win 98, very nice!

Would you like to put all that code into 3 global routines? smile
Say:
   function ras_is_connected()
   function ras_dial(number, name, password)
   procedure ras_hangup()

IMHO this would be actually useful together with the programs for
downloading files, that are already in the archieves.

A code snippet that uses the 3 routines could look something like this:

integer tries, try
boolean connected_self

connected_self = FALSE
if not ras_is_connected() then
   tries = 3
   try = 1
   while ras_dial(123, "me", "hi") do
      if try >= tries then
         err_abort("Dial up not successfull")
      end if
      try += 1
      sleep(1)
   end while
   connected_self = TRUE
end if

[do this and that on the internet]

if connected_self then
   ras_hangup()
end if


Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

5. Re: RasDial() API

> > .. may be found at:
> > http://www.king.igs.net/~wolfritz/EuDial.zip    2 kilobytes
> 
> Worked fine for me on Win 98, very nice!
> 
> Would you like to put all that code into 3 global routines? smile

Hi Juergen, perhaps...but...

First question, has anyone tried this on NT/XP ?

.. anyways,  I'm currently writing two more demos.
The second pops up a 'Connect To' dialog, so you don't have to fill in
phone_number, and user_name,
and perhaps not even pass_word.
( I don't save mine, so I dunno.. )
.. but it uses Rundll.exe, so...

Second question, does NT/XP have Rundll.exe in it's %Windir% ?

The last demo is an oddball.
Using Win95/98, you manually/programatically fill in user_name, and pass_word,
if you want,  however,
in WinNT/XP, it's presumably all done automatically, using the current users
logon credentials.

new topic     » goto parent     » topic index » view message » categorize

6. Re: RasDial() API

Since I wanted more feedback, I've uploaded this, which includes the next two
demos.

 http://www.king.igs.net/~wolfritz/EuDial.zip    7 kilobytes

new topic     » goto parent     » topic index » view message » categorize

7. Re: RasDial() API

Wolf wrote:

>>> .. may be found at:
>>> http://www.king.igs.net/~wolfritz/EuDial.zip    2 kilobytes
>>
>> Worked fine for me on Win 98, very nice!
>>
>> Would you like to put all that code into 3 global routines? smile
>
> Hi Juergen, perhaps...but...
>
> First question, has anyone tried this on NT/XP ?

Unfortunately, I cannot do so, because at my office the computer that
is connected to the internet runs Windows 98, too.

<snip>

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

8. Re: RasDial() API

Wolf wrote:

> Since I wanted more feedback, I've uploaded this, which includes the
> next two demos.
>
>  http://www.king.igs.net/~wolfritz/EuDial.zip    7 kilobytes

Unfortunately, both new demos do not run as expected on my system. I
think the code itself is OK, but it always calls the first RAS entry,
which is a very special one on my system. Calling the second RAS entry
would work fine on my system, I believe.

Since you cannot know how all the systems out there look like, I think
the most flexible and robust way is to use something like this:
   ras_dial(phone_number, user_name, pass_word) -- like in your first demo
         or
   ras_dial(name_of_the_desired_RAS_entry)

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu