Platform SDK: RAS/Routing and RAS |
The RasSecurityDialogBegin function is a third-party RAS security DLL entry point that the Windows NT/Windows 2000 RAS server calls when a remote user tries to connect. This enables the security DLL to begin its authentication of the remote user.
Note that Windows NT/Windows 2000 currently provides RAS security host support only for serial devices; other types of connections, such as ISDN or a virtual private network (VPN) connection, are not supported.
DWORD WINAPI RasSecurityDialogBegin( HPORT hPort, // RAS handle to the port PBYTE pSendBuf, // pointer to buffer for sending data DWORD SendBufSize, // size, in bytes, of the send buffer PBYTE pRecvBuf, // pointer to buffer for receiving data DWORD RecvBufSize, // size, in bytes, of the receive buffer VOID (WINAPI * RasSecurityDialogComplete) // pointer to the completion function );
Note that this handle is valid only in RAS security functions; you cannot use it in other Win32 I/O functions.
If the security DLL successfully starts the authentication operation, RasSecurityDialogBegin should return NO_ERROR. In this case, the security DLL must later terminate the authentication transaction by calling the function pointed to by the RasSecurityDialogComplete parameter.
If an error occurs, RasSecurityDialogBegin should return a nonzero error code. In this case, the RAS server hangs up the call and records the error in the Windows NT/Windows 2000 event log. Returning a nonzero error code terminates the authentication transaction, so the security DLL does not need to call the RasSecurityDialogComplete function.
When a Windows NT/Windows 2000 RAS server receives a call from a remote computer, it calls the RasSecurityDialogBegin function exported by the registered RAS security DLL, if there is one. When the RAS server calls this function, it passes the following information to the security DLL:
The port handle and buffer pointers are valid until you call RasSecurityDialogComplete to terminate the authentication transaction.
Your RasSecurityDialogBegin implementation must return as soon as possible, because the RAS server is blocked and cannot accept any other calls until RasSecurityDialogBegin returns. The RasSecurityDialogBegin function should copy the input parameters and create a thread to communicate with and authenticate the remote user.
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Rasshost.h.
Remote Access Service (RAS) Overview, RAS Server Administration Functions, RasSecurityDialogComplete, RasSecurityDialogReceive, RasSecurityDialogSend