[DllImport("kernel32.dll")]
static extern uint SetFilePointer(IntPtr hFile, int lDistanceToMove,
IntPtr lpDistanceToMoveHigh, uint dwMoveMethod);
None.
Public Enum EMoveMethod : uint
FILE_BEGIN = 0
FILE_CURRENT = 1
FILE_END = 2
End Enum
<DllImport("kernel32.dll", SetLastError:=True)> _
Shared Function SetFilePointer( _
ByVal hFile As IntPtr, _
ByVal lDistanceToMove As Integer, _
ByRef lpDistanceToMoveHigh As IntPtr, _
ByVal dwMoveMethod As EMoveMethod) _
As System.UInt32
End Function
Public Const INVALID_SET_FILE_POINTER As Integer = -1
If you are using this function to access hard-disk sectors greater than (2^32 - 2) bytes,
then the third argument will not be null or IntPtr.Zero. So when you pass an IntPtr to
the third argument, pass it as a reference. To do this, just change the third argument signature
to: ref IntPtr lpDistanceToMoveHigh.
None.
Please add some!
Please add some!
Do you know one? Please contribute it!