Overview
Group
Quick Info

Windows NT
Yes
Win95
No
Win32s
No
Import Library
Dynamic load from RASMAN.DLL
Header File
rasshost.h
Unicode
No
Platform Notes
None

RasSecurityDialogReceive

[New - Windows NT]

The RasSecurityDialogReceive function starts an asynchronous operation that receives a response from a remote user. The response is the input that the user typed in a terminal window on the remote computer. A third-party RAS security DLL calls this function as part of its authentication of the remote user.

To call this function, you must first call the LoadLibrary function to load RASMAN.DLL. Then call the GetProcAddress function to get the DLL's RasSecurityDialogReceive entry point.

DWORD WINAPI RasSecurityDialogReceive(

HPORT hPort,
// RAS handle to the port
PBYTE pBuffer,
// pointer to buffer that receives the user's response
PWORD pBufferLength,
// returns size, in bytes, of the data received
DWORD Timeout,
// time-out period, in seconds
HANDLE hEvent
// event that is signaled when operation is finished
);

Parameters

hPort

Specifies the port handle that the RAS server passed to the security DLL in the RasSecurityDialogBegin call for this authentication transaction.

pBuffer

Pointer to the receive buffer that was passed to the security DLL in the RasSecurityDialogBegin call. When the asynchronous receive operation has been completed successfully, this buffer contains the response from the remote user.

pBufferLength

Pointer to a variable that receives the number of bytes returned in the pBuffer buffer.

Timeout

Specifies a time-out period, in seconds, after which the RAS server sets the hEvent event object to the signaled state. If this value is zero, there is no time-out period; that is, the RAS server does not signal the event object until the receive operation has been completed.

hEvent

Specifies the handle of an event object created by the CreateEvent function. The RAS server sets the event object to the signaled state when the receive operation has been completed or when the time-out period has elapsed.

Return Values

If the function is successful, the return value is PENDING (defined in RASERROR.H). This indicates that the receive operation is in progress.

If an error occurs, the return value is one of the error codes defined in RASERROR.H or WINERROR.H. GetLastError does not provide extended error information.

Remarks

After calling the RasSecurityDialogSend function to send a security challenge to the remote user, the security DLL must call the RasSecurityDialogReceive function to get the user's response.

The RasSecurityDialogReceive function is asynchronous. When the function returns, the security DLL must use one of the wait functions, such as WaitForSingleObject, to wait for the hEvent event object to be signaled. The RAS server signals the event object when the receive operation has been completed or when the time-out interval has elapsed. If the receive operation is successful, the pBuffer buffer contains the response from the remote user, and the pBufferLength parameter indicates the number of bytes received.

You can use the Timeout parameter to specify a time-out interval. If the time-out elapses, the RAS server signals the event object, and the pBufferLength parameter indicates that zero bytes were transferred. Alternatively, you can set Timeout to zero, and specify a time-out interval in the wait function that you use to wait for the event object to be signaled.

When a security DLL is authenticating a remote user, the connection operation on the remote computer enters a RASCS_Interactive paused state. The message sent by RasSecurityDialogSend is displayed as output in a terminal window on the remote computer. The response received by RasSecurityDialogReceive is the input that the remote user types in the terminal window. The RASCS_Interactive value is defined in the RASCONNSTATE enumeration.

See Also

CreateEvent
, GetProcAddress, LoadLibrary, RASCONNSTATE, RasSecurityDialogSend, WaitForSingleObject

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database