hello how are you ?please help me to find the error in this codewhy this code work but the RasDialDlg() function not dial
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
public struct RASDIALDLG
{
public int size ;
public IntPtr hwndOwner;
public Int32 flags;
public Int64 xdialog;
public Int64 ydialog;
public Int32 subentry;
public Int32 error;
public IntPtr reserved;
public IntPtr reserved2;
}
[DllImport("Rasdlg.dll")]public static extern int RasDialDlg(string phonebook, string entry,string number,ref RASDIALDLG lpInfo);
private void button1_Click(object sender, System.EventArgs e)
string lpszPhonebook=null;
string lpszEntry=null;
string lpszPhoneNumber="07770500";
RASDIALDLG lpInfo = new RASDIALDLG();
int result;
lpInfo.size =Marshal.SizeOf(lpInfo);
result= RasDialDlg(lpszPhonebook,lpszEntry,lpszPhoneNumber,ref lpInfo);