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 8125545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:51:27+00:00 2026-06-06T06:51:27+00:00

I need to know the IOCTL constants for the various strings (for example the

  • 0

I need to know the IOCTL constants for the various strings (for example the value of the constant of IOCTL_ATA_PASS_THROUGH). Searching the net I found that those constants are defined in the header Ntddscsi.h but those constant are wrong. For example the constant value of IOCTL_ATA_PASS_THROUGH should be 4D02C while in the header file it is 40B

The question is: where can I find a list with ALL the right values?

Thanks

EDIT:

I’ve found http://www.ioctls.net/ where there are listed all the codes. Thanks anyway for the explanation of why the value in Ntddscsi.h is not the “final” value

  • 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-06-06T06:51:28+00:00Added an answer on June 6, 2026 at 6:51 am

    They are in ntddscsi.h found at c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\ (on a 64 bit system). They are defied as:

    #define IOCTL_ATA_PASS_THROUGH          CTL_CODE(IOCTL_SCSI_BASE, 0x040b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
    

    and IOCTL_SCSI_BASE is

    #define IOCTL_SCSI_BASE                 FILE_DEVICE_CONTROLLER
    

    from the same file

    and these from WinIoCtl.h

    #define METHOD_BUFFERED                 0
    #define FILE_DEVICE_CONTROLLER          0x00000004
    #define FILE_READ_ACCESS          ( 0x0001 )    // file & pipe
    #define FILE_WRITE_ACCESS         ( 0x0002 )    // file & pipe
    

    and CTL_CODE comes from WinIoCtl.h found at c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\

    #define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
    ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
    

    )

    so your final value for IOCTL_ATA_PASS_THROUGH will be:

    (4 << 16 | (1 | 2) << 14 | 0x040b << 2 | 0) = 315436 = 4D02C 
    

    😀

    And if you will apply these calculations to the other IO_…. macros you will find the values. On the other end it’s much easier to write a short application just to print out their values as hex 😉

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

Sidebar

Related Questions

I need know how change Choose a value... in controlType: CategoryFilter of ControlWrapper Example:
Need to know this so that i could send DTMF and that is going
I need to know the selected node's depth from a ASP.NET Treeview on client
I need to know that how to read the directory path from a .properties
Need to know how to get YQL to return only data that's newer than
I need to know a couple of things, concerning IRC servers that I couldnt
I need to know if a person that comes to my website went from
Need to know which event triggered after text selection done in Apple iPad. It
I need to know if all the client-side validator checks have succeeded, or if
i need to know how can i connect telephone using php languages

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.