Board index » delphi » Using RAS API from Delphi

Using RAS API from Delphi

Hello!

I'm writing a program that requires a connection to a ISP. The program must
work both on NT and 9x versions of Windows, using RAS-API (rasapi32.dll).
Does anayone have samples of code that cold help me? I'll apreciate any kind
of help.

Best Regards,

Paulo JT Matos

 

Re:Using RAS API from Delphi


Paulo JT Matos <pmatos.ddlis...@fdti.pt> schreef in berichtnieuws
7m7f72$td...@duke.telepac.pt...

Quote
> Hello!

> I'm writing a program that requires a connection to a ISP. The program
must
> work both on NT and 9x versions of Windows, using RAS-API (rasapi32.dll).
> Does anayone have samples of code that cold help me? I'll apreciate any
kind
> of help.

> Best Regards,

> Paulo JT Matos

CONNECT TO INTERNET

Add ShellApi.pas to your Uses clause then use the WIN32 API call
ShellExecute() as described below. I tested this with Windows98
Replace the text DIALUP_NETWORKING_NAME below with the name of your
Dialup Networking Account as listed in your "My Computer/Dialup
Networking"

{...}
procedure TForm1.Button1Click(Sender: TObject);
begin
  ShellExecute(Application.MainForm.Handle,
    nil,
    pChar(ExtractFilePath('rundll32.exe')+'rundll32.exe'),
    pChar('rnaui.dll,RnaDial DIALUP_NETWORKING_NAME'),
    pChar(ExtractFilePath('rundll32.exe')),
    SW_SHOW);
end;
{...}

Fill in the connection name in DIALUP_NETWORKING_NAME.

What i'm looking for, is how to retrieve a list of available DUN
connections.
Anyone?

Rik

Re:Using RAS API from Delphi


Quote
"Rik." wrote:
> Paulo JT Matos <pmatos.ddlis...@fdti.pt> schreef in berichtnieuws
> 7m7f72$td...@duke.telepac.pt...
> > Hello!

> > I'm writing a program that requires a connection to a ISP. The program
> must
> > work both on NT and 9x versions of Windows, using RAS-API (rasapi32.dll).
> > Does anayone have samples of code that cold help me? I'll apreciate any
> kind
> > of help.

> > Best Regards,

> > Paulo JT Matos

> CONNECT TO INTERNET

> Add ShellApi.pas to your Uses clause then use the WIN32 API call
> ShellExecute() as described below. I tested this with Windows98
> Replace the text DIALUP_NETWORKING_NAME below with the name of your
> Dialup Networking Account as listed in your "My Computer/Dialup
> Networking"

> {...}
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>   ShellExecute(Application.MainForm.Handle,
>     nil,
>     pChar(ExtractFilePath('rundll32.exe')+'rundll32.exe'),
>     pChar('rnaui.dll,RnaDial DIALUP_NETWORKING_NAME'),
>     pChar(ExtractFilePath('rundll32.exe')),
>     SW_SHOW);
> end;
> {...}

> Fill in the connection name in DIALUP_NETWORKING_NAME.

> What i'm looking for, is how to retrieve a list of available DUN
> connections.
> Anyone?

> Rik

I've got a programm (with code) that does just that. I found it somewhere on
internet. I could send it to you, if you want
(d_ras.zip, 50k)

--

Pieter van Erp
Oss, THE NETHERLANDS

    "It ain't over 'till the Fat Lady sings"

Take a look at FinanceNet: summaries of economic and financial papers
  [ http://home.hccnet.nl/p.a.v.erp ]

(to reply, please remove the NOSPAM section from by e-mail)

Re:Using RAS API from Delphi


Pieter,

If you mean the list of DUN connections, i'm interested!
Please send to "s.regoor<i...@c-content.nl>" (include the "s.regoor<" and
">" please)

Thanx!

Serge Regoor

---------

Quote
Pieter van Erp wrote in message <3790579A.2BF09...@hccnet.NOSPAM.nl>...
>"Rik." wrote:

>> Paulo JT Matos <pmatos.ddlis...@fdti.pt> schreef in berichtnieuws
>> 7m7f72$td...@duke.telepac.pt...
>> > Hello!

>> > I'm writing a program that requires a connection to a ISP. The program
>> must
>> > work both on NT and 9x versions of Windows, using RAS-API
(rasapi32.dll).
>> > Does anayone have samples of code that cold help me? I'll apreciate any
>> kind
>> > of help.

>> > Best Regards,

>> > Paulo JT Matos

>> CONNECT TO INTERNET

>> Add ShellApi.pas to your Uses clause then use the WIN32 API call
>> ShellExecute() as described below. I tested this with Windows98
>> Replace the text DIALUP_NETWORKING_NAME below with the name of your
>> Dialup Networking Account as listed in your "My Computer/Dialup
>> Networking"

>> {...}
>> procedure TForm1.Button1Click(Sender: TObject);
>> begin
>>   ShellExecute(Application.MainForm.Handle,
>>     nil,
>>     pChar(ExtractFilePath('rundll32.exe')+'rundll32.exe'),
>>     pChar('rnaui.dll,RnaDial DIALUP_NETWORKING_NAME'),
>>     pChar(ExtractFilePath('rundll32.exe')),
>>     SW_SHOW);
>> end;
>> {...}

>> Fill in the connection name in DIALUP_NETWORKING_NAME.

>> What i'm looking for, is how to retrieve a list of available DUN
>> connections.
>> Anyone?

>> Rik

>I've got a programm (with code) that does just that. I found it somewhere
on
>internet. I could send it to you, if you want
>(d_ras.zip, 50k)

>--

>Pieter van Erp
>Oss, THE NETHERLANDS

>    "It ain't over 'till the Fat Lady sings"

>Take a look at FinanceNet: summaries of economic and financial papers
>  [ http://home.hccnet.nl/p.a.v.erp ]

>(to reply, please remove the NOSPAM section from by e-mail)

Other Threads