- 浏览: 462785 次
- 性别:
- 来自: 坚持零分
文章分类
最新评论
-
wzwahl36:
文章非常赞,http://www.atool.org/img2 ...
在浏览器中解析Base64编码图像 -
realyasswl:
ie sucks
IE9 媲美Firebug的强大的程序员开发工具 -
di1984HIT:
不错啊。呵呵。
MS的一些小工具 -
NothingCanBeDone:
楼主,你这Project,能放出来了,感激不尽。
[Ray Linn]用Visual Studio 2008开发IE BHO(浏览器帮助对象) 之三 -
烬难烬:
这就没了???我去....
IE9 媲美Firebug的强大的程序员开发工具
今天写了个小程序,将Winioctl.h里的IO控制代码转化成C#下的enum,以方便用C#控制Windows的设备,做一些底层的操作(比如格式化之类的),奇怪的是我找不到FILE_DEVICE_AVIO这个设备的定义。。。。
下面是无注释版。
如果你想知道某个设备支持哪些control code,你可以用这个工具:
http://tbaioctl.codeplex.com/
下面是无注释版。
如果你想知道某个设备支持哪些control code,你可以用这个工具:
http://tbaioctl.codeplex.com/
/* coded by Ray Linn */ IOCTL_STORAGE_BASE = FileDevice.MASS_STORAGE, IOCTL_STORAGE_CHECK_VERIFY = (IOCTL_STORAGE_BASE << 16) | (0x0200 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_CHECK_VERIFY2 = (IOCTL_STORAGE_BASE << 16) | (0x0200 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_MEDIA_REMOVAL = (IOCTL_STORAGE_BASE << 16) | (0x0201 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_EJECT_MEDIA = (IOCTL_STORAGE_BASE << 16) | (0x0202 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_LOAD_MEDIA = (IOCTL_STORAGE_BASE << 16) | (0x0203 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_LOAD_MEDIA2 = (IOCTL_STORAGE_BASE << 16) | (0x0203 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_RESERVE = (IOCTL_STORAGE_BASE << 16) | (0x0204 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_RELEASE = (IOCTL_STORAGE_BASE << 16) | (0x0205 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_FIND_NEW_DEVICES = (IOCTL_STORAGE_BASE << 16) | (0x0206 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_MCN_CONTROL = (IOCTL_STORAGE_BASE << 16) | (0x0251 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_GET_MEDIA_TYPES = (IOCTL_STORAGE_BASE << 16) | (0x0300 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_GET_MEDIA_TYPES_EX = (IOCTL_STORAGE_BASE << 16) | (0x0301 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = (IOCTL_STORAGE_BASE << 16) | (0x0304 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_GET_HOTPLUG_INFO = (IOCTL_STORAGE_BASE << 16) | (0x0305 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_SET_HOTPLUG_INFO = (IOCTL_STORAGE_BASE << 16) | (0x0306 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_STORAGE_RESET_BUS = (IOCTL_STORAGE_BASE << 16) | (0x0400 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_RESET_DEVICE = (IOCTL_STORAGE_BASE << 16) | (0x0401 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_BREAK_RESERVATION = (IOCTL_STORAGE_BASE << 16) | (0x0405 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_PERSISTENT_RESERVE_IN = (IOCTL_STORAGE_BASE << 16) | (0x0406 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_PERSISTENT_RESERVE_OUT = (IOCTL_STORAGE_BASE << 16) | (0x0407 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_STORAGE_GET_DEVICE_NUMBER = (IOCTL_STORAGE_BASE << 16) | (0x0420 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_PREDICT_FAILURE = (IOCTL_STORAGE_BASE << 16) | (0x0440 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_READ_CAPACITY = (IOCTL_STORAGE_BASE << 16) | (0x0450 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_QUERY_PROPERTY = (IOCTL_STORAGE_BASE << 16) | (0x0500 << 2) | (Method.Buffered) | (0 << 14), IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES = (IOCTL_STORAGE_BASE << 16) | (0x0501 << 2) | (Method.Buffered) | (FileAccess.Write << 14), IOCTL_STORAGE_GET_BC_PROPERTIES = (IOCTL_STORAGE_BASE << 16) | (0x0600 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_STORAGE_ALLOCATE_BC_STREAM = (IOCTL_STORAGE_BASE << 16) | (0x0601 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_STORAGE_FREE_BC_STREAM = (IOCTL_STORAGE_BASE << 16) | (0x0602 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT = (IOCTL_STORAGE_BASE << 16) | (0x0620 << 2) | (Method.Buffered) | (0 << 14), OBSOLETE_IOCTL_STORAGE_RESET_BUS = (IOCTL_STORAGE_BASE << 16) | (0x0400 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = (IOCTL_STORAGE_BASE << 16) | (0x0401 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_BASE = FileDevice.DISK, IOCTL_DISK_GET_DRIVE_GEOMETRY = (IOCTL_DISK_BASE << 16) | (0x0000 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_GET_PARTITION_INFO = (IOCTL_DISK_BASE << 16) | (0x0001 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_SET_PARTITION_INFO = (IOCTL_DISK_BASE << 16) | (0x0002 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_DRIVE_LAYOUT = (IOCTL_DISK_BASE << 16) | (0x0003 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_SET_DRIVE_LAYOUT = (IOCTL_DISK_BASE << 16) | (0x0004 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_VERIFY = (IOCTL_DISK_BASE << 16) | (0x0005 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_FORMAT_TRACKS = (IOCTL_DISK_BASE << 16) | (0x0006 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_REASSIGN_BLOCKS = (IOCTL_DISK_BASE << 16) | (0x0007 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_PERFORMANCE = (IOCTL_DISK_BASE << 16) | (0x0008 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_IS_WRITABLE = (IOCTL_DISK_BASE << 16) | (0x0009 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_LOGGING = (IOCTL_DISK_BASE << 16) | (0x000a << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_FORMAT_TRACKS_EX = (IOCTL_DISK_BASE << 16) | (0x000b << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_HISTOGRAM_STRUCTURE = (IOCTL_DISK_BASE << 16) | (0x000c << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_HISTOGRAM_DATA = (IOCTL_DISK_BASE << 16) | (0x000d << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_HISTOGRAM_RESET = (IOCTL_DISK_BASE << 16) | (0x000e << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_REQUEST_STRUCTURE = (IOCTL_DISK_BASE << 16) | (0x000f << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_REQUEST_DATA = (IOCTL_DISK_BASE << 16) | (0x0010 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_PERFORMANCE_OFF = (IOCTL_DISK_BASE << 16) | (0x0018 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_CONTROLLER_NUMBER = (IOCTL_DISK_BASE << 16) | (0x0011 << 2) | (Method.Buffered) | (0 << 14), SMART_GET_VERSION = (IOCTL_DISK_BASE << 16) | (0x0020 << 2) | (Method.Buffered) | (FileAccess.Read << 14), SMART_SEND_DRIVE_COMMAND = (IOCTL_DISK_BASE << 16) | (0x0021 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), SMART_RCV_DRIVE_DATA = (IOCTL_DISK_BASE << 16) | (0x0022 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_PARTITION_INFO_EX = (IOCTL_DISK_BASE << 16) | (0x0012 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_SET_PARTITION_INFO_EX = (IOCTL_DISK_BASE << 16) | (0x0013 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_DRIVE_LAYOUT_EX = (IOCTL_DISK_BASE << 16) | (0x0014 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_SET_DRIVE_LAYOUT_EX = (IOCTL_DISK_BASE << 16) | (0x0015 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_CREATE_DISK = (IOCTL_DISK_BASE << 16) | (0x0016 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_LENGTH_INFO = (IOCTL_DISK_BASE << 16) | (0x0017 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = (IOCTL_DISK_BASE << 16) | (0x0028 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_REASSIGN_BLOCKS_EX = (IOCTL_DISK_BASE << 16) | (0x0029 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_UPDATE_DRIVE_SIZE = (IOCTL_DISK_BASE << 16) | (0x0032 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GROW_PARTITION = (IOCTL_DISK_BASE << 16) | (0x0034 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_CACHE_INFORMATION = (IOCTL_DISK_BASE << 16) | (0x0035 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_SET_CACHE_INFORMATION = (IOCTL_DISK_BASE << 16) | (0x0036 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_GET_WRITE_CACHE_STATE = (IOCTL_DISK_BASE << 16) | (0x0037 << 2) | (Method.Buffered) | (FileAccess.Read << 14), OBSOLETE_DISK_GET_WRITE_CACHE_STATE = (IOCTL_DISK_BASE << 16) | (0x0037 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_DELETE_DRIVE_LAYOUT = (IOCTL_DISK_BASE << 16) | (0x0040 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_UPDATE_PROPERTIES = (IOCTL_DISK_BASE << 16) | (0x0050 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_FORMAT_DRIVE = (IOCTL_DISK_BASE << 16) | (0x00f3 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_DISK_SENSE_DEVICE = (IOCTL_DISK_BASE << 16) | (0x00f8 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_CHECK_VERIFY = (IOCTL_DISK_BASE << 16) | (0x0200 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_MEDIA_REMOVAL = (IOCTL_DISK_BASE << 16) | (0x0201 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_EJECT_MEDIA = (IOCTL_DISK_BASE << 16) | (0x0202 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_LOAD_MEDIA = (IOCTL_DISK_BASE << 16) | (0x0203 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_RESERVE = (IOCTL_DISK_BASE << 16) | (0x0204 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_RELEASE = (IOCTL_DISK_BASE << 16) | (0x0205 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_FIND_NEW_DEVICES = (IOCTL_DISK_BASE << 16) | (0x0206 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_DISK_GET_MEDIA_TYPES = (IOCTL_DISK_BASE << 16) | (0x0300 << 2) | (Method.Buffered) | (0 << 14), IOCTL_DISK_RESET_SNAPSHOT_INFO = (IOCTL_DISK_BASE << 16) | (0x0084 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_CHANGER_BASE = FileDevice.CHANGER, IOCTL_CHANGER_GET_PARAMETERS = (IOCTL_CHANGER_BASE << 16) | (0x0000 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_GET_STATUS = (IOCTL_CHANGER_BASE << 16) | (0x0001 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_GET_PRODUCT_DATA = (IOCTL_CHANGER_BASE << 16) | (0x0002 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_SET_ACCESS = (IOCTL_CHANGER_BASE << 16) | (0x0004 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_CHANGER_GET_ELEMENT_STATUS = (IOCTL_CHANGER_BASE << 16) | (0x0005 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = (IOCTL_CHANGER_BASE << 16) | (0x0006 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_SET_POSITION = (IOCTL_CHANGER_BASE << 16) | (0x0007 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_EXCHANGE_MEDIUM = (IOCTL_CHANGER_BASE << 16) | (0x0008 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_MOVE_MEDIUM = (IOCTL_CHANGER_BASE << 16) | (0x0009 << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_REINITIALIZE_TRANSPORT = (IOCTL_CHANGER_BASE << 16) | (0x000A << 2) | (Method.Buffered) | (FileAccess.Read << 14), IOCTL_CHANGER_QUERY_VOLUME_TAGS = (IOCTL_CHANGER_BASE << 16) | (0x000B << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_SERIAL_LSRMST_INSERT = (FileDevice.SERIAL_PORT << 16) | (31 << 2) | (Method.Buffered) | (0 << 14), IOCTL_SERENUM_EXPOSE_HARDWARE = (FileDevice.SERENUM << 16) | (128 << 2) | (Method.Buffered) | (0 << 14), IOCTL_SERENUM_REMOVE_HARDWARE = (FileDevice.SERENUM << 16) | (129 << 2) | (Method.Buffered) | (0 << 14), IOCTL_SERENUM_PORT_DESC = (FileDevice.SERENUM << 16) | (130 << 2) | (Method.Buffered) | (0 << 14), IOCTL_SERENUM_GET_PORT_NAME = (FileDevice.SERENUM << 16) | (131 << 2) | (Method.Buffered) | (0 << 14), FSCTL_REQUEST_OPLOCK_LEVEL_1 = (FileDevice.FILE_SYSTEM << 16) | (0 << 2) | (Method.Buffered) | (0 << 14), FSCTL_REQUEST_OPLOCK_LEVEL_2 = (FileDevice.FILE_SYSTEM << 16) | (1 << 2) | (Method.Buffered) | (0 << 14), FSCTL_REQUEST_BATCH_OPLOCK = (FileDevice.FILE_SYSTEM << 16) | (2 << 2) | (Method.Buffered) | (0 << 14), FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = (FileDevice.FILE_SYSTEM << 16) | (3 << 2) | (Method.Buffered) | (0 << 14), FSCTL_OPBATCH_ACK_CLOSE_PENDING = (FileDevice.FILE_SYSTEM << 16) | (4 << 2) | (Method.Buffered) | (0 << 14), FSCTL_OPLOCK_BREAK_NOTIFY = (FileDevice.FILE_SYSTEM << 16) | (5 << 2) | (Method.Buffered) | (0 << 14), FSCTL_LOCK_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (6 << 2) | (Method.Buffered) | (0 << 14), FSCTL_UNLOCK_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (7 << 2) | (Method.Buffered) | (0 << 14), FSCTL_DISMOUNT_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (8 << 2) | (Method.Buffered) | (0 << 14), FSCTL_IS_VOLUME_MOUNTED = (FileDevice.FILE_SYSTEM << 16) | (10 << 2) | (Method.Buffered) | (0 << 14), FSCTL_IS_PATHNAME_VALID = (FileDevice.FILE_SYSTEM << 16) | (11 << 2) | (Method.Buffered) | (0 << 14), FSCTL_MARK_VOLUME_DIRTY = (FileDevice.FILE_SYSTEM << 16) | (12 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_RETRIEVAL_POINTERS = (FileDevice.FILE_SYSTEM << 16) | (14 << 2) | (Method.Neither) | (0 << 14), FSCTL_GET_COMPRESSION = (FileDevice.FILE_SYSTEM << 16) | (15 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_COMPRESSION = (FileDevice.FILE_SYSTEM << 16) | (16 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), FSCTL_SET_BOOTLOADER_ACCESSED = (FileDevice.FILE_SYSTEM << 16) | (19 << 2) | (Method.Neither) | (0 << 14), FSCTL_OPLOCK_BREAK_ACK_NO_2 = (FileDevice.FILE_SYSTEM << 16) | (20 << 2) | (Method.Buffered) | (0 << 14), FSCTL_INVALIDATE_VOLUMES = (FileDevice.FILE_SYSTEM << 16) | (21 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_FAT_BPB = (FileDevice.FILE_SYSTEM << 16) | (22 << 2) | (Method.Buffered) | (0 << 14), FSCTL_REQUEST_FILTER_OPLOCK = (FileDevice.FILE_SYSTEM << 16) | (23 << 2) | (Method.Buffered) | (0 << 14), FSCTL_FILESYSTEM_GET_STATISTICS = (FileDevice.FILE_SYSTEM << 16) | (24 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_NTFS_VOLUME_DATA = (FileDevice.FILE_SYSTEM << 16) | (25 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_NTFS_FILE_RECORD = (FileDevice.FILE_SYSTEM << 16) | (26 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_VOLUME_BITMAP = (FileDevice.FILE_SYSTEM << 16) | (27 << 2) | (Method.Neither) | (0 << 14), FSCTL_GET_RETRIEVAL_POINTERS = (FileDevice.FILE_SYSTEM << 16) | (28 << 2) | (Method.Neither) | (0 << 14), FSCTL_MOVE_FILE = (FileDevice.FILE_SYSTEM << 16) | (29 << 2) | (Method.Buffered) | (0 << 14), FSCTL_IS_VOLUME_DIRTY = (FileDevice.FILE_SYSTEM << 16) | (30 << 2) | (Method.Buffered) | (0 << 14), FSCTL_ALLOW_EXTENDED_DASD_IO = (FileDevice.FILE_SYSTEM << 16) | (32 << 2) | (Method.Neither) | (0 << 14), FSCTL_FIND_FILES_BY_SID = (FileDevice.FILE_SYSTEM << 16) | (35 << 2) | (Method.Neither) | (0 << 14), FSCTL_SET_OBJECT_ID = (FileDevice.FILE_SYSTEM << 16) | (38 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_OBJECT_ID = (FileDevice.FILE_SYSTEM << 16) | (39 << 2) | (Method.Buffered) | (0 << 14), FSCTL_DELETE_OBJECT_ID = (FileDevice.FILE_SYSTEM << 16) | (40 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_REPARSE_POINT = (FileDevice.FILE_SYSTEM << 16) | (41 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_REPARSE_POINT = (FileDevice.FILE_SYSTEM << 16) | (42 << 2) | (Method.Buffered) | (0 << 14), FSCTL_DELETE_REPARSE_POINT = (FileDevice.FILE_SYSTEM << 16) | (43 << 2) | (Method.Buffered) | (0 << 14), FSCTL_ENUM_USN_DATA = (FileDevice.FILE_SYSTEM << 16) | (44 << 2) | (Method.Neither) | (0 << 14), FSCTL_SECURITY_ID_CHECK = (FileDevice.FILE_SYSTEM << 16) | (45 << 2) | (Method.Neither) | (FileAccess.Read << 14), FSCTL_READ_USN_JOURNAL = (FileDevice.FILE_SYSTEM << 16) | (46 << 2) | (Method.Neither) | (0 << 14), FSCTL_SET_OBJECT_ID_EXTENDED = (FileDevice.FILE_SYSTEM << 16) | (47 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CREATE_OR_GET_OBJECT_ID = (FileDevice.FILE_SYSTEM << 16) | (48 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_SPARSE = (FileDevice.FILE_SYSTEM << 16) | (49 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_ZERO_DATA = (FileDevice.FILE_SYSTEM << 16) | (50 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_QUERY_ALLOCATED_RANGES = (FileDevice.FILE_SYSTEM << 16) | (51 << 2) | (Method.Neither) | (FileAccess.Read << 14), FSCTL_ENABLE_UPGRADE = (FileDevice.FILE_SYSTEM << 16) | (52 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_SET_ENCRYPTION = (FileDevice.FILE_SYSTEM << 16) | (53 << 2) | (Method.Neither) | (0 << 14), FSCTL_ENCRYPTION_FSCTL_IO = (FileDevice.FILE_SYSTEM << 16) | (54 << 2) | (Method.Neither) | (0 << 14), FSCTL_WRITE_RAW_ENCRYPTED = (FileDevice.FILE_SYSTEM << 16) | (55 << 2) | (Method.Neither) | (0 << 14), FSCTL_READ_RAW_ENCRYPTED = (FileDevice.FILE_SYSTEM << 16) | (56 << 2) | (Method.Neither) | (0 << 14), FSCTL_CREATE_USN_JOURNAL = (FileDevice.FILE_SYSTEM << 16) | (57 << 2) | (Method.Neither) | (0 << 14), FSCTL_READ_FILE_USN_DATA = (FileDevice.FILE_SYSTEM << 16) | (58 << 2) | (Method.Neither) | (0 << 14), FSCTL_WRITE_USN_CLOSE_RECORD = (FileDevice.FILE_SYSTEM << 16) | (59 << 2) | (Method.Neither) | (0 << 14), FSCTL_EXTEND_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (60 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_USN_JOURNAL = (FileDevice.FILE_SYSTEM << 16) | (61 << 2) | (Method.Buffered) | (0 << 14), FSCTL_DELETE_USN_JOURNAL = (FileDevice.FILE_SYSTEM << 16) | (62 << 2) | (Method.Buffered) | (0 << 14), FSCTL_MARK_HANDLE = (FileDevice.FILE_SYSTEM << 16) | (63 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SIS_COPYFILE = (FileDevice.FILE_SYSTEM << 16) | (64 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SIS_LINK_FILES = (FileDevice.FILE_SYSTEM << 16) | (65 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), FSCTL_RECALL_FILE = (FileDevice.FILE_SYSTEM << 16) | (69 << 2) | (Method.Neither) | (0 << 14), FSCTL_READ_FROM_PLEX = (FileDevice.FILE_SYSTEM << 16) | (71 << 2) | (Method.OutDirect) | (FileAccess.Read << 14), FSCTL_FILE_PREFETCH = (FileDevice.FILE_SYSTEM << 16) | (72 << 2) | (Method.Buffered) | (0 << 14), FSCTL_MAKE_MEDIA_COMPATIBLE = (FileDevice.FILE_SYSTEM << 16) | (76 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_SET_DEFECT_MANAGEMENT = (FileDevice.FILE_SYSTEM << 16) | (77 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_QUERY_SPARING_INFO = (FileDevice.FILE_SYSTEM << 16) | (78 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_ON_DISK_VOLUME_INFO = (FileDevice.FILE_SYSTEM << 16) | (79 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_VOLUME_COMPRESSION_STATE = (FileDevice.FILE_SYSTEM << 16) | (80 << 2) | (Method.Buffered) | (0 << 14), FSCTL_TXFS_MODIFY_RM = (FileDevice.FILE_SYSTEM << 16) | (81 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_QUERY_RM_INFORMATION = (FileDevice.FILE_SYSTEM << 16) | (82 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_TXFS_ROLLFORWARD_REDO = (FileDevice.FILE_SYSTEM << 16) | (84 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_ROLLFORWARD_UNDO = (FileDevice.FILE_SYSTEM << 16) | (85 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_START_RM = (FileDevice.FILE_SYSTEM << 16) | (86 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_SHUTDOWN_RM = (FileDevice.FILE_SYSTEM << 16) | (87 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_READ_BACKUP_INFORMATION = (FileDevice.FILE_SYSTEM << 16) | (88 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_TXFS_WRITE_BACKUP_INFORMATION = (FileDevice.FILE_SYSTEM << 16) | (89 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_CREATE_SECONDARY_RM = (FileDevice.FILE_SYSTEM << 16) | (90 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_GET_METADATA_INFO = (FileDevice.FILE_SYSTEM << 16) | (91 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_TXFS_GET_TRANSACTED_VERSION = (FileDevice.FILE_SYSTEM << 16) | (92 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_TXFS_SAVEPOINT_INFORMATION = (FileDevice.FILE_SYSTEM << 16) | (94 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_CREATE_MINIVERSION = (FileDevice.FILE_SYSTEM << 16) | (95 << 2) | (Method.Buffered) | (FileAccess.Write << 14), FSCTL_TXFS_TRANSACTION_ACTIVE = (FileDevice.FILE_SYSTEM << 16) | (99 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_SET_ZERO_ON_DEALLOCATION = (FileDevice.FILE_SYSTEM << 16) | (101 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_REPAIR = (FileDevice.FILE_SYSTEM << 16) | (102 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_REPAIR = (FileDevice.FILE_SYSTEM << 16) | (103 << 2) | (Method.Buffered) | (0 << 14), FSCTL_WAIT_FOR_REPAIR = (FileDevice.FILE_SYSTEM << 16) | (104 << 2) | (Method.Buffered) | (0 << 14), FSCTL_INITIATE_REPAIR = (FileDevice.FILE_SYSTEM << 16) | (106 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CSC_INTERNAL = (FileDevice.FILE_SYSTEM << 16) | (107 << 2) | (Method.Neither) | (0 << 14), FSCTL_SHRINK_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (108 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_SHORT_NAME_BEHAVIOR = (FileDevice.FILE_SYSTEM << 16) | (109 << 2) | (Method.Buffered) | (0 << 14), FSCTL_DFSR_SET_GHOST_HANDLE_STATE = (FileDevice.FILE_SYSTEM << 16) | (110 << 2) | (Method.Buffered) | (0 << 14), FSCTL_TXFS_LIST_TRANSACTION_LOCKED_FILES = (FileDevice.FILE_SYSTEM << 16) | (120 << 2) | (Method.Buffered) | (FileAccess.Read), FSCTL_TXFS_LIST_TRANSACTIONS = (FileDevice.FILE_SYSTEM << 16) | (121 << 2) | (Method.Buffered) | (FileAccess.Read << 14), FSCTL_QUERY_PAGEFILE_ENCRYPTION = (FileDevice.FILE_SYSTEM << 16) | (122 << 2) | (Method.Buffered) | (0 << 14), FSCTL_RESET_VOLUME_ALLOCATION_HINTS = (FileDevice.FILE_SYSTEM << 16) | (123 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_DEPENDENT_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (124 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SD_GLOBAL_CHANGE = (FileDevice.FILE_SYSTEM << 16) | (125 << 2) | (Method.Buffered) | (0 << 14), FSCTL_TXFS_READ_BACKUP_INFORMATION2 = (FileDevice.FILE_SYSTEM << 16) | (126 << 2) | (Method.Buffered) | (0 << 14), FSCTL_LOOKUP_STREAM_FROM_CLUSTER = (FileDevice.FILE_SYSTEM << 16) | (127 << 2) | (Method.Buffered) | (0 << 14), FSCTL_TXFS_WRITE_BACKUP_INFORMATION2 = (FileDevice.FILE_SYSTEM << 16) | (128 << 2) | (Method.Buffered) | (0 << 14), FSCTL_FILE_TYPE_NOTIFICATION = (FileDevice.FILE_SYSTEM << 16) | (129 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_BOOT_AREA_INFO = (FileDevice.FILE_SYSTEM << 16) | (140 << 2) | (Method.Buffered) | (0 << 14), FSCTL_GET_RETRIEVAL_POINTER_BASE = (FileDevice.FILE_SYSTEM << 16) | (141 << 2) | (Method.Buffered) | (0 << 14), FSCTL_SET_PERSISTENT_VOLUME_STATE = (FileDevice.FILE_SYSTEM << 16) | (142 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_PERSISTENT_VOLUME_STATE = (FileDevice.FILE_SYSTEM << 16) | (143 << 2) | (Method.Buffered) | (0 << 14), FSCTL_REQUEST_OPLOCK = (FileDevice.FILE_SYSTEM << 16) | (144 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CSV_TUNNEL_REQUEST = (FileDevice.FILE_SYSTEM << 16) | (145 << 2) | (Method.Buffered) | (0 << 14), FSCTL_IS_CSV_FILE = (FileDevice.FILE_SYSTEM << 16) | (146 << 2) | (Method.Buffered) | (0 << 14), FSCTL_QUERY_FILE_SYSTEM_RECOGNITION = (FileDevice.FILE_SYSTEM << 16) | (147 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CSV_GET_VOLUME_PATH_NAME = (FileDevice.FILE_SYSTEM << 16) | (148 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CSV_GET_VOLUME_NAME_FOR_VOLUME_MOUNT_POINT = (FileDevice.FILE_SYSTEM << 16) | (149 << 2) | (Method.Buffered) | (0 << 14), FSCTL_CSV_GET_VOLUME_PATH_NAMES_FOR_VOLUME_NAME = (FileDevice.FILE_SYSTEM << 16) | (150 << 2) | (Method.Buffered) | (0 << 14), FSCTL_IS_FILE_ON_CSV_VOLUME = (FileDevice.FILE_SYSTEM << 16) | (151 << 2) | (Method.Buffered) | (0 << 14), FSCTL_MARK_AS_SYSTEM_HIVE = FSCTL_SET_BOOTLOADER_ACCESSED, //IOCTL_AVIO_ALLOCATE_STREAM = (FILE_DEVICE_AVIO<<16)|( 1<<2)|( Method.Buffered)|( 0<<14), //IOCTL_AVIO_FREE_STREAM = (FILE_DEVICE_AVIO<<16)|( 2<<2)|( Method.Buffered)|( 0<<14), //IOCTL_AVIO_MODIFY_STREAM = (FILE_DEVICE_AVIO<<16)|( 3<<2)|( Method.Buffered)|( 0<<14), IOCTL_VOLUME_BASE = 0x00000056, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS = (IOCTL_VOLUME_BASE << 16) | (0 << 2) | (Method.Buffered) | (0 << 14), IOCTL_VOLUME_ONLINE = (IOCTL_VOLUME_BASE << 16) | (2 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_VOLUME_OFFLINE = (IOCTL_VOLUME_BASE << 16) | (3 << 2) | (Method.Buffered) | ((FileAccess.Read | FileAccess.Write) << 14), IOCTL_VOLUME_IS_CLUSTERED = (IOCTL_VOLUME_BASE << 16) | (12 << 2) | (Method.Buffered) | (0 << 14), IOCTL_VOLUME_GET_GPT_ATTRIBUTES = (IOCTL_VOLUME_BASE << 16) | (14 << 2) | (Method.Buffered) | (0 << 14)
发表评论
-
【DeviceIoControl】 三、制作磁盘镜像文件与磁盘格式化
2010-06-18 12:08 3661现在有许多“克隆”软件,可以对磁盘进行全盘复制。如果要制作磁盘 ... -
【DeviceIOControl】 二、获取软盘/硬盘/光盘的参数
2010-06-18 12:02 2318在上面那个例子中,将设备名换成“A:”取A盘参数,先用资源管理 ... -
【DeviceIOControl】 一、通过API访问设备驱动程序
2010-06-18 11:54 3306在NT/2000/XP中,如果想用 ... -
【WDK开发】一、配置VS2008的驱动程序开发环境
2010-03-27 10:41 9182要编写Windows平台上的驱 ...
相关推荐
其中,DeviceHandle是设备对象的句柄,IoControlCode是控制代码,InBuffer和OutBuffer分别用于传递输入和输出数据,BytesReturned用于返回实际读取或写入的字节数,Overlapped则用于异步操作。 二、IoControlCode的...
在实际应用中,开发者需要根据设备驱动程序的文档来确定合适的`dwIoControlCode`,这通常涉及到特定的设备控制代码,如IOCTL_DISK_GET_DRIVE_GEOMETRY等。`lpInBuffer`和`lpOutBuffer`则根据操作码的需求传递相应的...
在Delphi中,这通常通过创建一个`THandle`类型的句柄,调用`CreateFile`函数打开设备,然后使用`DeviceIoControl`函数发送特定的控制代码来实现。例如,要禁用网卡,我们可以发送`IOCTL_NDIS_QUERY_GLOBAL_STATS`...
崩溃的肉一个基于io控制代码的Windows驱动程序的简单模糊演示。 (将来会有一些功能)。 模糊框架应具有: 原始数据输入兰德原始数据崩溃目标接收崩溃日志分析日志:: 帮助 C:\Users\debug\Desktop\CrashMeat\src>....
该程序可以检测网络连接状况,连接一旦中断就会循环播放提示音,如果连接到网络,提示音就会自动停止播放。
2. `IoControlCode`:是控制代码,用于指示我们希望执行的操作。对于获取RSSI,我们需要使用特定的控制代码,如`OID_GEN_RSSI`或`IOCTL_NDIS_QUERY_GLOBAL_STATS`等。 3. `InBuffer` 和 `InBufferLength`:输入缓冲...
描述中提到"IoctlDecoder"是一个IOControlCode解释器,这意味着这个工具的主要功能是帮助开发者理解并解码特定的IOCTL代码。IOCTL代码是设备驱动程序用来识别和处理不同请求的标识符,它们是十六进制值,直接对应于...
标题 "led_流水强开_Vc_源码.zip" 暗示了这是一个与LED流水灯控制相关的项目,源代码是用C++编写的,因为".vc"通常指的是Visual C++项目。LED流水灯是一种常见的电子工程应用,常用于装饰或指示目的。这种程序可能...
驱动级按键模拟通常会使用IoControlCode发送特定的控制代码到键盘驱动,从而触发键盘事件。这需要对Windows内核编程有深入的理解,包括IRP(I/O请求包)的处理、设备上下文的管理以及中断处理等。 描述中提到的“@...
具体来说,我们可以使用`DeviceIoControl`函数配合`IOCTL_STORAGE_QUERY_PROPERTY`控制代码来查询硬盘的属性,其中包括序列号。 以下是一个简单的DELPHI代码示例,演示了如何获取硬盘序列号: ```delphi uses ...
在描述中提到的"对IOControlCode进行fuzz测试"是指对驱动程序中处理特定设备或系统功能的控制代码进行模糊测试。IOCTL是操作系统与驱动程序之间通信的一种方式,允许用户空间程序向驱动发送命令并接收响应。通过对...
它首先通过`CreateFileA`打开驱动器,然后用`DeviceIoControl`发送`IOCTL_STORAGE_QUERY_PROPERTY`控制代码获取存储设备属性,最后根据返回的`STORAGE_BUS_TYPE`结构体中的`BusType`字段来确定总线类型。 要获取...
通过这个函数,用户空间的应用程序可以向驱动程序发送控制代码,并接收相应的数据。下面我们将详细介绍`DeviceIoControl`函数的用法、参数解析、注意事项以及一个简单的示例。 #### 一、`DeviceIoControl`函数概述 ...
接下来,你需要找到合适的控制码(IOControlCode)来隐藏或显示驱动器。这通常需要深入理解Windows内部的工作机制,并可能涉及一些低级文件系统知识。例如,可能需要使用`FSCTL_SET_SPARSE`控制码来模拟一个空的驱动...
传递控制代码和输入/输出缓冲区,执行驱动提供的特定操作。 3. **示例代码**: ```delphi uses ... Winapi.SetupAPI, Winapi.DevicesAPI; var DeviceInfoSet: HDEVINFO; InterfaceData: SP_DEVICE_...
你需要传递`IOCTL_DISK_READ_DRIVE_MEDIA`或`FSCTL_READ_FILE_USING_OFFSET`等控制代码,以及一个缓冲区来接收扇区数据。 3. **ReadFile**:最后,使用`ReadFile`函数实际读取指定偏移量的扇区数据到之前创建的缓冲...
这涉及到与GPIO控制器的交互,可能通过IoControlCode发送IOCTL请求来实现。在WinCE中,这可能使用 ZwDeviceIoControlFile 函数来完成。驱动程序还会处理中断服务,如果LED操作需要中断支持的话。 在描述中提到的...
4. 设备驱动交互:通过IoControlCode发送I/O请求,与硬件设备进行通信。 五、学习与实践 学习Windows内核API不仅需要理解API的功能和用法,还需要熟悉系统结构和原理。实践中,开发者应通过调试工具(如WinDbg)...
9. **IoControlCode**:驱动程序使用IoControlCode来识别由I/O请求包中的控制代码指定的操作。不同的IoControlCode对应不同的设备命令或控制请求。 10. **回调函数**:如IRP_MJ_READ和IRP_MJ_WRITE等,是驱动程序...
驱动程序通过系统调用与用户模式下的应用程序交互,比如通过IoControlCode传递控制代码来执行隐藏或显示进程的操作。 用户界面程序部分则使用易语言编写,这部分代码负责与用户交互,如接收用户命令,调用驱动接口...