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?
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
|
Not Categorized, Please Help
|
|