Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteFileGatherAsync()

static unsafe ValueTask System.IO.RandomAccess.WriteFileGatherAsync ( SafeFileHandle handle,
IntPtr segmentsPtr,
int bytesToWrite,
long fileOffset,
CancellationToken cancellationToken )
inlinestaticprivate

Definition at line 700 of file RandomAccess.cs.

701 {
702 handle.EnsureThreadPoolBindingInitialized();
704 try
705 {
708 {
711 {
714 }
715 overlappedValueTaskSource.RegisterForCancellation(cancellationToken);
716 }
717 }
718 catch
719 {
721 throw;
722 }
723 overlappedValueTaskSource.FinishedScheduling();
725 }
static unsafe int WriteFileGather(SafeHandle hFile, long *aSegmentArray, int nNumberOfBytesToWrite, IntPtr lpReserved, NativeOverlapped *lpOverlapped)
static Memory< byte > long CancellationToken cancellationToken
static Memory< byte > long fileOffset
static int GetLastWin32ErrorAndDisposeHandleIfInvalid(SafeFileHandle handle)
static ValueTask FromException(Exception exception)
Definition ValueTask.cs:190

References System.IO.RandomAccess.cancellationToken, System.IO.RandomAccess.fileOffset, System.Threading.Tasks.ValueTask< TResult >.FromException(), Microsoft.Win32.SafeHandles.SafeFileHandle.OverlappedValueTaskSource.GetIOError(), System.IO.Strategies.FileStreamHelpers.GetLastWin32ErrorAndDisposeHandleIfInvalid(), System.handle, Interop.Kernel32.WriteFileGather(), and System.IntPtr.Zero.

Referenced by System.IO.RandomAccess.WriteGatherAtOffsetSingleSyscallAsync().