[DllImport("Rasdlg.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool RasDialDlg(
IntPtr phoneBook,
string entryName,
IntPtr phoneNumber,
ref RASDIALDLG info);
TODO
RASDIALDLG Struct
Do you know one? Please contribute it!
I don't use phoneBook and phoneNumber, so they are as IntPtr.
Please check my English !
Please add some!
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);