RASADFunc callback function

The RASADFunc function is an application-defined callback function that is used to provide a customized user interface for autodialing.

Syntax


BOOL WINAPI RASADFunc(
  _In_  LPTSTR        lpszPhonebook,
  _In_  LPTSTR        lpszEntry,
  _In_  LPRASADPARAMS lpAutoDialParams,
  _Out_ LPDWORD       lpdwRetCode
);

Parameters

lpszPhonebook [in]

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.

Windows Me/98/95:  This parameter is always NULL. Dial-up networking stores phone-book entries in the registry rather than in a phone-book file.

lpszEntry [in]

Pointer to a null-terminated string that specifies the phone-book entry to use.

lpAutoDialParams [in]

Pointer to a RASADPARAMS structure that indicates how to position the window of the AutoDial user interface. The structure can also specify a parent window for the AutoDial window.

lpdwRetCode [out]

Pointer to a variable that receives a value if the function performs the dialing operation. If the dialing operation succeeds, set this variable to ERROR_SUCCESS. If the dialing operation fails, set it to a nonzero value.

Return value

If the application performs the dialing operation, return TRUE. Use the lpdwRetCode parameter to indicate the results of the dialing operation.

If the application does not perform the dialing operation, return FALSE. In this case, the system uses the default user interface for dialing.

Remarks

When the system starts an AutoDial operation for a phone-book entry with a custom AutoDial handler, it calls the specified RASADFunc. The RASADFunc can start a thread to perform the custom-dialing operation. The RASADFunc function returns TRUE to indicate that it took over the dialing, or FALSE to allow the system to perform the dialing.

If the RASADFunc function performs the dialing operation, it presents its own user interface for dialing and calls the RasDial function to do the actual dialing. The RASADFunc then returns TRUE to indicate that it took over the dialing. When the dialing operation has been completed, set the variable pointed to by the lpdwRetCode parameter to indicate success or failure.

The AutoDial DLL must provide both a RASADFUNCA (ANSI) and a RASADFUNCW (Unicode) version of the RASADFunc handler. To enable a RASADFunc AutoDial handler for a phone-book entry, use the RASENTRY structure in a call to the RasSetEntryProperties function. The szAutodialDll member specifies the name of the DLL that contains the handler, and the szAutodialFunc member specifies the exported name of the handler. The szAutodialFunc member should not include the "A" or "W" suffix.

RASADFunc is a placeholder for the library-defined function name. The RASADFUNC type is a pointer to a RASADFunc function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ras.h

Unicode and ANSI names

RASADFuncW (Unicode) and RASADFuncA (ANSI)

See also

Remote Access Service (RAS) Overview
Remote Access Service Functions
RasDial
RASENTRY
RasSetEntryProperties

 

 

Community Additions

ADD
Show: