Search by Tags

CTL CODE

 
Applicable for

Compare with Revision

Subscribe for this article updates

Macro to define IOCTL codes.

Define

#define FILE_DEVICE_DISK       0x00000007
#define FILE_DEVICE_HAL          0x00000101
#define METHOD_BUFFERED                 0
#define FILE_ANY_ACCESS                 0
 
 
#define CTL_CODE( DeviceType, Function, Method, Access ) (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))

Sample

You can find a sample in the SourceCode examples.