copyTo method
Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/objidl/nf-objidl-istream-copyto.
Implementation
@pragma('vm:prefer-inline')
void copyTo(
IStream? pstm,
int cb,
Pointer<Uint64>? pcbRead,
Pointer<Uint64>? pcbWritten,
) {
final hr$ = HRESULT(
_CopyToFn(
ptr,
pstm?.ptr ?? nullptr,
cb,
pcbRead ?? nullptr,
pcbWritten ?? nullptr,
),
);
if (hr$.isError) throw WindowsException(hr$);
}