RasSecurityDialogBegin  23O0_KB 

[New - Windows NT]

The RasSecurityDialogBegin function is a third-party RAS security DLL entry point that the Windows NT RAS server calls when a remote user tries to connect. This enables the security DLL to begin its authentication of the remote user.

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

   );

 

 

Parameters

hPort

Specifies a RAS port handle. The security DLL uses this handle in other RAS security functions, such as RasSecurityDialogSend2MFI9YW and RasSecurityDialogReceive15UDWGA, to identify this authentication transaction.

Note that this handle is valid only in RAS security functions; you cannot use it in other Win32 I/O functions.

pSendBuf

Pointer to a buffer allocated by the RAS server. The security DLL uses this buffer with the RasSecurityDialogSend2MFI9YW function to send text that is displayed in the RAS terminal window on the remote computer.

SendBufSize

Specifies the size, in bytes, of the pSendBuf buffer.

pRecvBuf

Pointer to a buffer allocated by the RAS server. The security DLL uses this buffer with the RasSecurityDialogReceive15UDWGA function to receive the response from the remote user.

RecvBufSize

Specifies the size, in bytes, of the pRecvBuf buffer.

RasSecurityDialogComplete

Specifies a pointer to a RasSecurityDialogCompleteCYIZSJ function. When the security DLL has completed the authentication of the remote user, it calls this function to report the results to the RAS server.

 

Return Values

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 event log. Returning a nonzero error code terminates the authentication transaction, so the security DLL does not need to call the RasSecurityDialogComplete function.

Remarks

When a Windows NT 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:

    A port handle to identify the connection

    Pointers to buffers to use when communicating with the remote user

    A pointer to a RasSecurityDialogCompleteCYIZSJ function to call when the authentication has been completed

 

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.

See Also

RasSecurityDialogComplete, RasSecurityDialogReceive, RasSecurityDialogSend