INtime SDK Help
WaitForRtIo
INtime SDK v6 > About INtime > INtime Kernel > Files > WaitForRtIo

Waits for the termination of a previous asynchronous call to ReadRtFile or WriteRtFile.

BOOLEAN WaitForRtIo(
    LPASYNCIO lpAsync,
    DWORD dwMilliseconds,
    LPDWORD lpdwBytesTransferred);

Parameters

lpAsync
A pointer for a ASYNCIO structure previously passed to a call to ReadRtFile or WriteRtFile where the completion message will be received.
dwMilliseconds
The time that the caller is prepared to wait, in milliseconds.
lpdwBytesTransferred
A pointer to a location where the actual transfer count will be stored on successful completion.

Remarks

Waits for the completion of an asynchronous operation. If the operation ultimately fails, or the call times out, no value will be written to lpdwBytesTransferred and the last error value will be set to the failure status.

Note: Asynchronous file operations are not currently supported on INtime Distributed RTOS

Return values

Returns TRUE on success, else FALSE on failure. Status codes returned by GetLastRtError on failure include:

Status value Meaning
E_TIME The operation timed out.
E_EXIST The handle provided is not a valid handle
E_TYPE The handle provided is not a handle for a file
E_BAD_BUF The address of the ASYNCIO structure is invalid or not writable
E_NOT_CONFIGURED Call is not supported in INtime Distributed RTOS.

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also