Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 751683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:41:41+00:00 2026-05-14T14:41:41+00:00

I was wondering how hard disk access works. Ex, how could I view/modify sectors?

  • 0

I was wondering how hard disk access works. Ex, how could I view/modify sectors? Im targeting Windows if that helps.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:41:42+00:00Added an answer on May 14, 2026 at 2:41 pm

    This page seems to have some relevant information on the subject:

    You can open a physical or logical
    drive using the CreateFile()
    application programming interface
    (API) with these device names provided
    that you have the appropriate access
    rights to the drive (that is, you must
    be an administrator). You must use
    both the CreateFile() FILE_SHARE_READ
    and FILE_SHARE_WRITE flags to gain
    access to the drive.

    Once the logical or physical drive has
    been opened, you can then perform
    direct I/O to the data on the entire
    drive. When performing direct disk
    I/O, you must seek, read, and write in
    multiples of sector sizes of the
    device and on sector boundaries. Call
    DeviceIoControl() using
    IOCTL_DISK_GET_DRIVE_GEOMETRY to get
    the bytes per sector, number of
    sectors, sectors per track, and so
    forth, so that you can compute the
    size of the buffer that you will need.

    The documentation of CreateFile also offers some clues:

    You can use the CreateFile function to open a physical disk drive or a volume,
    which returns a direct access storage device (DASD) handle that can be
    used with the DeviceIoControl function. This enables you to access the
    disk or volume directly, for example such disk metadata as the partition
    table. However, this type of access also exposes the disk drive or
    volume to potential data loss, because an incorrect write to a disk
    using this mechanism could make its contents inaccessible to the
    operating system. To ensure data integrity, be sure to become
    familiar with DeviceIoControl and how other APIs behave
    differently with a direct access handle as opposed to a file system handle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering how to format a hard disk in Windows 7 through c++?
I was wondering how hard it is to make a class for downloads that
I find it hard to believe that I am the only one wondering about
I was wondering, how often does DHTMLX offer a new version and how hard
Wondering if any of you can help me: I've made a signup modal that
Wondering if someone could please explain the difference between these two queries and advise
Wondering if someone could help me. I have next to no knowledge with Ajax,
Wondering if there is any way to get the lambda expressions that result from
Wondering if anyone can suggest a good file replication tool that will replicate across
wondering if some of you know what javascript framework facebook is using ? Thanks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.