AsyncFileIoRequest class
An overlapped file read or write.
- Use
import ThinkMeta.ConcurrentTasks.AsyncIo.AsyncFileIoRequest;- Namespace
ThinkMeta::ConcurrentTasks::AsyncIo- Inherits
AsyncIoRequest
Syntax
class AsyncFileIoRequest : public AsyncIoRequest<Windows::ErrorCode>Remarks
Holds the file offset to transfer at, and after completion the Win32 error code (GetError) and the transferred bytes (GetTransferredBytes). Not usable on its own: use WaitableAsyncFileIoRequest(_s), or an own request type built on it that reacts to the completion in RequestCompleted. The request must stay alive while its operation is pending (see AsyncIoRequestBase).
See also
WaitableAsyncFileIoRequest_s, AsyncFile
Constructors
AsyncFileIoRequestprotected
Methods
GetOffset
SetOffset
Sets the file offset for the next operation.
Syntax
void SetOffset(unsigned long long offset) noexcept;Parameters
offsetunsigned long long- File offset in bytes to read or write at; sector-aligned for a handle opened with
FILE_FLAG_NO_BUFFERING.
Remarks
Call after Reset (which zeroes it) and before issuing; overlapped file handles have no file pointer, every operation needs one.
See also
RequestCompleted
Stores the Win32 error code and the transferred bytes; signals nothing.
Syntax
void RequestCompleted(DWORD error, DWORD bytesTransferred) noexcept override;Parameters
errorDWORD- The operation's Win32 error code;
ERROR_SUCCESSwhen it succeeded. bytesTransferredDWORD- Bytes the operation transferred.
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).