Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RomSteady

Direct Sector Access

This topic is 5539 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been doing quite a bit of experimentation lately on using direct sector access using the Win32 API, and so far, I''ve been pretty successful. However, I''ve been having issues reading DVD sectors on unprotected DVD''s. On all other devices, I use CreateFile() API to open "\\.\x:", where x is the drive letter. Then, I seek to the beginning of the sector and read the sector. (Oh, and as a heads-up for the .NET guys [of which I am one], the FileStream classes will not work with direct sector access even for code that has full rights. They throw an ArgumentException.) On CD''s and hard drives, it all works fine. Reading the sector gives me the exact contents of the sector in question. However, when I do the same thing on DVD''s, it returns all 0''s. Does Win32 require different code to handle direct sector access for UDF volumes as opposed to CDFS, NTFS and FAT32 volumes? RomSteady - I play games for a living.

Share this post


Link to post
Share on other sites
Advertisement
*bump*

And note: I am not trying to read DVD movies. There are enough things out there that can do that. I''m trying to read DVD data disks (like an MSDN DVD), and all I''m getting is 0''s.

Any thoughts?

Share this post


Link to post
Share on other sites
Hrm. I can''t think of any reason why that might be the case. It gives you 0s for the entire disc? It''s definitely claiming that the reads are successful?


Share this post


Link to post
Share on other sites
quote:
Original post by DrPizza
Hrm. I can''t think of any reason why that might be the case. It gives you 0s for the entire disc? It''s definitely claiming that the reads are successful?





It gives me 0''s for the entire disk, regardless of the type of DVD. Even if I start reading from the first byte of the stream, which is guaranteed to be on a sector boundary, I''m still getting 0''s.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!