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 LoadLibrary1VGHBF8 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
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
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
Remarks
After calling
the RasSecurityDialogSend
The RasSecurityDialogReceive
function is asynchronous. When the function returns, the security DLL must use
one of the wait functions, such as WaitForSingleObject
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