Hey Merrion,

You got it! But didn't....

I simply changed the vbNull to 0 and BOOM, my device handle is returned!

So I was very happy for a second until I then tried to move the file pointer using SetFilePointer() and got the same error!

VB Code:
  1. <DllImport("kernel32.dll")> _
  2.     Public Function SetFilePointer( _
  3.         ByVal hFile As Long, _
  4.         ByVal lDistanceToMove As Long, _
  5.         ByVal lpDistanceToMoveHigh As Long, _
  6.         ByVal dwMoveMethod As Long) As Long
  7.     End Function
  8.  
  9.     Public Const FILE_BEGIN As Long = 0
  10.     Public Const FILE_EOF As Long = &HFFFFFFFF

Used like so:

VB Code:
  1. If SetFilePointer(hDevice, (iSectorSize * iSectorNumber), 0, FILE_BEGIN) = FILE_EOF Then
  2.    MessageBox.Show("Unable to find sector " & iSectorNumber, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
  3.    Return baDataBuffer
  4. End If

This threw the same "Attempted to read or write....." error. Hmmmmmm

Thanks Merrion,
Matt.