RasCustomDialDlgFn callback function (rasdlg.h)

[This function is not available as of Windows Server 2008.

]

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.

Syntax

RasCustomDialDlgFn Rascustomdialdlgfn;

BOOL Rascustomdialdlgfn(
  HINSTANCE hInstDll,
  DWORD dwFlags,
  LPWSTR lpszPhonebook,
  LPWSTR lpszEntry,
  LPWSTR lpszPhoneNumber,
  LPRASDIALDLG lpInfo,
  PVOID pvInfo
)
{...}

Parameters

hInstDll

Handle to the instance of the custom-dialing DLL that was loaded.

dwFlags

A set of bit flags that specify RasCustomDialDlg options.

Value Meaning
RCD_Logon
If this flag is set to one, the connection was dialed from a Windows Logon context. RasDial uses this information to get the appropriate user preferences for the connection entry. If RasDial is called from this entry point, the dwfOptions member of the lpRasDialExtension parameter must have the RDEOPT_NoUser flag set to indicate the connection was dialed from a Windows Logon context.
 

Windows Server 2003 and Windows XP/2000:  This parameter is reserved and should not be used.

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.

pvInfo

Reserved for internal use. This parameter will always be NULL.

Return value

If the user creates, copies, or edits a phone-book entry, the return value should be TRUE. Otherwise, the function should return FALSE.

If an error occurs, RasCustomEntryDlg should set the dwError member of the RASENTRYDLG structure to a value from Routing and Remote Access Error Codes or Winerror.h.

Remarks

RAS calls 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 dwfOptions 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

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rasdlg.h

See also

Custom Dialers

RASENTRY

RasCustomDial

RasCustomEntryDlg

RasCustomHangUp

RasDialDlg

Remote Access Service (RAS) Overview

Remote Access Service Functions