Hi All,

I m using Qt 4.1.5 on my MAC.
I am using the following code to read the HardDisk or any other Drive.

Qt Code:
  1. fileDescriptor = open ( DriveName, O_RDONLY );
  2. lseek(fileDescriptor,(off_t) SectNo*SECTSIZE, SEEK_SET);
  3. numBytes = read( fileDescriptor, Buffer, Size );
To copy to clipboard, switch view to plain text mode 

where for disk I have Drive Name as /dev/rdisk0.

But if I read CD by the above code it is returning non negative value in fileDescriptor and lseek also working right but in the read function is is returning -1.


If some one know why it is not working with CD then plz help me.


Thanks.