Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

RasDialDlg (rasapi32)
 
.
Summary
The RasDialDlg function establishes a RAS connection using a specified phone-book entry and the credentials of the logged-on user. The function displays a stream of dialog boxes that indicate the state of the connection operation.

C# Signature:

[DllImport("Rasdlg.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool RasDialDlg(
    IntPtr phoneBook,
    string entryName,
    IntPtr phoneNumber,
    ref RASDIALDLG info);

VB Signature:

TODO

User-Defined Types:

RASDIALDLG Struct

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

I don't use phoneBook and phoneNumber, so they are as IntPtr.
Please check my English !

Tips & Tricks:

Please add some!

Sample Code:

RASDIALDLG info = new RASDIALDLG();
info.dwSize = Marshal.SizeOf(info);
bool ret = RAW.RasDialDlg(IntPtr.Zero, "Some Connection Name", IntPtr.Zero, ref info);
if (ret == false && info.dwError != ERROR_SUCCESS)
    throw new Win32Exception(info.dwError);

Documentation
RasDialDlg on MSDN

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions