Hi,
TO read a sector (2048) using the ATA IOCTL
This works on a 32 bit machine
inputBuffer.AtaFlags = 03|ATA_FLAGS_48BIT_COMMAND;
inputBuffer.Length = 40;
inputBuffer.DataTransferLength = 512;
inputBuffer.TimeOutValue = 5;
inputBuffer.DataBuffer = buffer;
inputBuffer.Lun = 0;
inputBuffer.PathId = 0;
inputBuffer.TargetId = 0;
inputBuffer.PreviousTaskFile[0] = 0;
inputBuffer.PreviousTaskFile[1] = 1;
inputBuffer.PreviousTaskFile[2] = 0;
inputBuffer.PreviousTaskFile[3] = (0x800 >> 24 ) & 0xFF;;
inputBuffer.PreviousTaskFile[4] = (0x800 >> 16 ) & 0xFF;;
inputBuffer.PreviousTaskFile[5] = 0xe0;
inputBuffer.PreviousTaskFile[6] = 0x20;
inputBuffer.PreviousTaskFile[7] = 0;
inputBuffer.CurrentTaskFile[0] = 0;
inputBuffer.CurrentTaskFile[1] = 1;
inputBuffer.CurrentTaskFile[2] = 0;
inputBuffer.CurrentTaskFile[3] = (0x800 >> 8 ) & 0xFF;;
inputBuffer.CurrentTaskFile[4] = (0x800 >> 0 ) & 0xFF;;
inputBuffer.CurrentTaskFile[5] = 0xe0;
inputBuffer.CurrentTaskFile[6] = 0x20;
inputBuffer.CurrentTaskFile[7] = 0;
The same on a 64 bit machine does not give me the required results.
Would anyone happen to have any ideas on how the LBA should be specified on 64 bit?
Thanks,
Sonia.