public static extern int RasDial( [In][Optional] IntPtr extensions, [In][Optional][MarshalAs(UnmanagedType.LPStr)] string phonebook, [In] ref RasDialParams dialParams, [In] int notifierType, [In][Optional] RasDialFunc callback, [Out] out IntPtr connection);
public static IntPtr RasDial(RasDialParams dialParams, string phonebook = null, RasDialFunc callback = null) { int result = RasDial(IntPtr.Zero, phonebook, ref dialParams, 0, callback, out IntPtr connection); if (result == RasErrorCodes.ERROR_SUCCESS) { return(connection); } throw new RasApi32Exception(result); }
public static RasDialParams RasGetEntryDialParams(string entryName, string phonebook = null) { var dialparams = new RasDialParams { Size = Marshal.SizeOf <RasDialParams>(), EntryName = entryName }; int result = RasGetEntryDialParams(phonebook, ref dialparams, out _); if (result == RasErrorCodes.ERROR_SUCCESS) { return(dialparams); } throw new RasApi32Exception(result); }
public static extern int RasGetEntryDialParams( [In][Optional][MarshalAs(UnmanagedType.LPStr)] string phonebook, [In][Out] ref RasDialParams dialParams, [Out] out bool passwordRetrieved);