Board index » delphi » RAS, dialup dialog

RAS, dialup dialog

Hi,
How can I call the Dialup standard dialog - like when you're not connected
and you try to surf with Internet Explorer so this dialog pops up?
I have a dialup component but it dials the connection without showing this
dialog. I don't like writing my own dialog just to let user select what
dialup entry he wants.

Thanks,
Smola

 

Re:RAS, dialup dialog


Quote
"Smola" <supersmola...@VEinet.hr> wrote in message

news:at8omn$1tk$1@sunce.iskon.hr...

Quote
> Hi,
> How can I call the Dialup standard dialog - like when you're not connected
> and you try to surf with Internet Explorer so this dialog pops up?
> I have a dialup component but it dials the connection without showing this
> dialog. I don't like writing my own dialog just to let user select what
> dialup entry he wants.

Got it. If someone is interested (There are extra declarations for calling
RasDialDlg func), but unfortunately, works only under WinNT:

  TRasDialDlg = record
    dwSize      : DWORD;
    hwndOwner   : HWND;
    dwFlags     : DWORD;
    xDlg        : integer;
    yDlg        : integer;
    dwSubEntry  : DWORD;
    dwError     : DWORD;
    reserved    : DWORD;
    reserved2   : DWORD;
  end;

  TRasPBDlg = record
    dwSize      : DWORD;
    hwndOwner   : HWND;
    dwFlags     : DWORD;
    xDlg        : integer;
    yDlg        : integer;
    dwCallbackId  : DWORD;
    pCallback     : pointer;
    dwError     : DWORD;
    reserved    : DWORD;
    reserved2   : DWORD;
  end;

function RasPhonebookDlg(lpszPhonebook, pszEntry : pchar; var lpInfo :
TRasPBDlg) : BOOL;
stdcall; external 'rasdlg.dll' name 'RasPhonebookDlgA';

function RasDialDlg(lpszPhonebook, pszEntry, lpszPhoneNumber : pchar; var
lpInfo : TRasDialDlg) : BOOL;
stdcall; external 'rasdlg.dll' name 'RasDialDlgA';

function DialDlg : integer;
var
  infopb : TRasPBDlg;
begin
  FillChar(infopb, Sizeof(TRasPBDlg), 0);
  infopb.dwSize := SizeOf(TRasPBDlg);
  infopb.hwndOwner := Form1.Handle;
  infopb.xDlg := 100;
  infopb.yDlg := 100;
  RasPhonebookDlg(nil, 'Iskon gold', infopb);
  Result := infopb.dwError;
end;

Other Threads