public static long Seek( SafeFileHandle handle, long distance, FileSeekOrigin origin) { long result; var flag = PInvokeHelper.Seek(handle, distance, out result, origin); var lastWin32Error = Marshal.GetLastWin32Error(); if (!flag) { throw new Win32Exception( lastWin32Error, string.Format( Resources.ErrorSeek, lastWin32Error, CheckAddDotEnd(new Win32Exception(lastWin32Error).Message))); } return result; }
public static extern bool Seek( SafeFileHandle hFile, long distance, out long newFilePointer, FileSeekOrigin origin);