Platform SDK: RAS/Routing and RAS

RasCustomDial

The RasCustomDial 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 remote-access dialing routines.

DWORD (WINAPI  * RasCustomDial) (
  HINSTANCE hInstDll,               // handle to DLL instance
  LPRASDIALEXTENSIONS lpRasDialExtensions,  // pointer to
                                            //  function extensions data
  LPCTSTR lpszPhonebook,            // pointer to full path
                                    //  and file name of
                                    //  phone-book file 
  LPRASDIALPARAMS lpRasDialParams,  // pointer to calling 
                                    //  parameters data
  DWORD dwNotifierType,             // specifies type of
                                    //  RasDial event handler
  LPVOID lpvNotifier,               // specifies a handler
                                    //  for RasDial events
  LPHRASCONN lphRasConn             // pointer to variable
                                    //  to receive connection handle
);

Parameters

hInstDll
Handle to the instance of the custom-dial DLL that was loaded.
lpRasDialExtensions
Pointer to a RASDIALEXTENSIONS structure that specifies a set of RasDial extended features to enable. If you do not need to enable any of the extensions, set this parameter to NULL.
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.
lpRasDialParams
Pointer to a RASDIALPARAMS structure that specifies calling parameters for the RAS connection.

The caller must set the RASDIALPARAMS structure's dwSize member to sizeof(RASDIALPARAMS) to identify the version of the structure being passed.

dwNotifierType
This parameter is the same as the dwNotifierType parameter for the RasDial function. See the RasDial reference page for more information.
lpvNotifier
This parameter is the same as the lpvNotifier parameter for the RasDial function. See the RasDial reference page for more information.
lphRasConn
Pointer to a variable of type HRASCONN. You must set the HRASCONN variable to NULL before calling RasDial. If RasDial succeeds, it stores a handle to the RAS connection into *lphRasConn.

Return Values

If the function succeeds, the immediate return value should be zero. In addition, the function should store a handle to the RAS connection into the variable pointed to by the lphRasConn parameter.

If the function fails, the immediate return value should be a nonzero error value, either from the set listed in Raserror.h or ERROR_NOT_ENOUGH_MEMORY.

Remarks

RAS calls this entry point from RasDial, 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.

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

Requirements

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

See Also

Remote Access Service (RAS) Overview, Remote Access Service Functions, RasCustomDialDlg, RasCustomEntryDlg, RasCustomHangUp, RasDial, RASENTRY