private int SetFilePointerHook(IntPtr hfile, int ldistancetomove, IntPtr lpdistancetomovehigh, EMoveMethod dwmovemethod) { VirtualHandle handle; if (_virtualHandles.TryGetValue(hfile, out handle)) { #if TRACE Console.WriteLine("Seeking in virtual file " + handle.Filename + " Dir: " + dwmovemethod + " Dist: " + ldistancetomove + " High: " + lpdistancetomovehigh); #endif switch (dwmovemethod) { case EMoveMethod.Begin: handle.Stream.Seek(ldistancetomove, SeekOrigin.Begin); break; case EMoveMethod.Current: handle.Stream.Seek(ldistancetomove, SeekOrigin.Current); break; case EMoveMethod.End: handle.Stream.Seek(ldistancetomove, SeekOrigin.End); break; default: throw new ArgumentOutOfRangeException("dwmovemethod"); } return((int)handle.Stream.Position); } return(Win32Api.SetFilePointer(hfile, ldistancetomove, lpdistancetomovehigh, dwmovemethod)); }
public static extern uint SetFilePointerEx( [In] SafeFileHandle hFile, [In] long lDistanceToMove, [In, Out] IntPtr lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
public static extern bool SetFilePointerEx( SafeFileHandle hFile, long liDistanceToMove, IntPtr lpNewFilePointer, EMoveMethod dwMoveMethod);
public static extern bool SetFilePointerEx( SafeFileHandle hFile, Int64 liDistanceToMove, out Int64 lpNewFilePointer, EMoveMethod dwMoveMethod);
static internal extern unsafe int SetFilePointer( [In] IntPtr hFile, [In] int lDistanceToMove, [In] IntPtr lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
static extern uint SetFilePointer([In] SafeFileHandle hFile, [In] int lDistanceToMove, [Out] out int lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
static extern uint SetFilePointer( [In] SafeFileHandle hFile, [In] uint lDistanceToMove, [In] IntPtr lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
public static extern Boolean SetFilePointerEx( [In] SafeFileHandle hFile, [In] Int64 liDistanceToMove, [Out] out Int64 lpNewFilePointer, [In] EMoveMethod dwMoveMethod);
public unsafe static extern int SetFilePointer( IntPtr hFile, int lDistanceToMove, int *lpDistanceToMoveHigh, EMoveMethod dwMoveMethod );
private static extern int SetFilePointer(SafeFileHandle hDevice, int lDistanceToMove, [In, Out] int lpDistanceToMoveHigh, EMoveMethod dwMoveMethod);
public static extern bool SetFilePointerEx( [In] SafeFileHandle hFile, [In] long liDistanceToMove, [Out, Optional][MarshalAs(UnmanagedType.I8)] out long lpNewFilePointer, [In][MarshalAs(UnmanagedType.U4)] EMoveMethod dwMoveMethod);
public static extern int SetFilePointer(SafeFileHandle handle, int lDistanceToMove, out int lpDistanceToMoveHigh, EMoveMethod dwMoveMethod);
internal static extern UInt32 SetFilePointer( SafeFileHandle hFile, Int32 cbDistanceToMove, IntPtr pDistanceToMoveHigh, EMoveMethod fMoveMethod);
static extern long SetFilePointer( [In] SafeFileHandle hFile, [In] long lDistanceToMove, [Out] out long lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
internal static extern uint SetFilePointer( [In] IntPtr hFile, [In] int lDistanceToMove, [Out] out int lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
static extern internal int SetFilePointer([In] SafeFileHandle hFile, [In] int lDistanceToMove, ref int lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);
public static unsafe extern bool SetFilePointerEx( SafeFileHandle hFile, // HANDLE Int64 distanceToMove, // LARGE_INTEGER Int64 *newFilePointer, // PLARGE_INTEGER EMoveMethod dwMoveMethod); // DWORD
public static extern uint SetFilePointer( [In] Microsoft.Win32.SafeHandles.SafeFileHandle hFile, [In] int lDistanceToMove, [In, Out] ref int lpDistanceToMoveHigh, [In] EMoveMethod dwMoveMethod);