RASDIALFUNC2 callback function (ras.h)
A RasDialFunc2 callback function is called by the RasDial function calls when a change of state occurs during a remote access connection process. A RasDialFunc2 function is similar to the RasDialFunc1 callback function, except that it provides additional information for multilink connections.
Syntax
RASDIALFUNC2 Rasdialfunc2;
DWORD Rasdialfunc2(
ULONG_PTR unnamedParam1,
DWORD unnamedParam2,
HRASCONN unnamedParam3,
UINT unnamedParam4,
tagRASCONNSTATE unnamedParam5,
DWORD unnamedParam6,
DWORD unnamedParam7
)
{...}
Parameters
unnamedParam1
unnamedParam2
unnamedParam3
unnamedParam4
unnamedParam5
unnamedParam6
unnamedParam7
Return value
If the RasDialFunc2 function returns a nonzero value, RasDial continues to send callback notifications.
If the RasDialFunc2 function returns zero, RasDial stops sending callback notifications for all subentries.
Remarks
A RasDial connection operation is suspended during a call to a RasDialFunc2 callback function. For that reason, the RasDialFunc2 implementation generally returns as quickly as possible. There are two exceptions to that rule. Asynchronous (slow) devices such as modems often have time-out periods measured in seconds rather than milliseconds; a slow return from a RasDialFunc2 function is generally not a problem. The prompt return requirement also does not apply when dwError is nonzero, indicating that an error has occurred. It is safe, for example, to put up an error dialog box and wait for user input.
The RasDialFunc2 implementation should not depend on the order or occurrence of particular RASCONNSTATE connection states, because this may vary between platforms.
Do not call the RasDial function from within a RasDialFunc2 callback function. Call the RasGetConnectStatus, RasEnumEntries, RasEnumConnections, RasGetErrorString, and RasHangUp functions from within the callback function. For example, calling RasGetConnectStatus from within a callback function would be useful for determining the name and type of the connecting device.
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 | ras.h |