Platform SDK: RAS/Routing and RAS

RasCustomDialDlg

The RasCustomDialDlg function is an application-defined function that is exported by a third-party custom-dialing DLL. This function allows third-party vendors to implement custom RAS connection dialog boxes.

BOOL (WINAPI  * RasCustomDialDlg) (
  HINSTANCE hInstDll,      // handle to DLL instance
  DWORD dwFlags,           // reserved
  LPTSTR lpszPhonebook,    // pointer to the full path and 
                           //  file name of the phone-book file
  LPTSTR lpszEntry,        // pointer to the name of the 
                           //  phone-book entry to dial
  LPTSTR lpszPhoneNumber,  // pointer to replacement phone 
                           //  number to dial
  LPRASDIALDLG lpInfo      // pointer to a structure that 
                           //  contains additional parameters
);

Parameters

hInstDll
Handle to the instance of the custom-dialing DLL that was loaded.
dwFlags
The parameter is reserved for future use.
lpszPhonebook
Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file. If this parameter is NULL, the function uses the current default phone-book file. The default phone-book file is the one selected by the user in the User Preferences property sheet of the Dial-Up Networking dialog box.
lpszEntry
Pointer to a null-terminated string that contains the name of the phone-book entry to dial.
lpszPhoneNumber
Pointer to a null-terminated string that contains a phone number that overrides the numbers stored in the phone-book entry. If this parameter is NULL, RasDialDlg uses the numbers in the phone-book entry.
lpInfo
Pointer to a RASDIALDLG structure that contains additional input and output parameters. On input, the dwSize member of this structure must specify sizeof(RASDIALDLG). If an error occurs, the dwError member returns an error code; otherwise, it returns zero.

Return Values

If the function establishes a RAS connection, the return value should be a nonzero value.

If an error occurs, or if the user selects a Cancel button during dialing box operation, the return value should be zero. If an error occurs, set the dwError member of the RASDIALDLG structure to a nonzero system error or a RAS error code from Raserror.h.

Remarks

RAS will call this entry point from RasDialDlg, if the szCustomDialDll member of the RASENTRY structure for the entry being dialed specifies a custom-dialing DLL.

If this entry point calls RasDial, the lpRasDialExtensions parameter must not be NULL, and the dwFlags member of the RASDIALEXTENSIONS structure must have the RDEOPT_CustomDial flag set.

The custom-dial dialog must support WM_COMMAND messages where LOWORD(wParam) equals IDCANCEL.

If the custom-dial DLL does not support this entry point, RAS returns ERROR_CANNOT_DO_CUSTOMDIAL to the caller of RasDialDlg.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Rasdlg.h.
  Unicode: Declared as Unicode and ANSI prototypes.

See Also

Remote Access Service (RAS) Overview, Remote Access Service Functions, RasCustomDial, RasCustomEntryDlg, RasCustomHangUp, RasDialDlg, RASENTRY