Device object ------ device name

Source: Internet
Author: User
Device object (device_object) --------------- main Member

I. device object (device_object)

Kd> dt _ device_object
Ntdll! _ Device_object
+ 0x000 type: int2b
+ 0x002 size: uint2b
+ 0x004 referencecount: int4b
+ 0x008 driverobject: ptr32 _ driver_object; driver object of the device
+ 0x00c nextdevice: ptr32 _ device_object; points to the next device, which belongs to the same drive object as the next device.
+ 0x010 attacheddevice: ptr32 _ device_object; appended to the nearest device above. This additional device generally belongs to another driver for filtering this layer.
+ 0x014 currentirp: ptr32 _ IRP
+ 0x018 Timer: ptr32 _ io_timer
+ 0x01c flags: uint4b; for example, Do _...
+ 0x020 characteristics: uint4b; for example, file _...
+ 0x024 VPB: ptr32 _ VPB
+ 0x028 deviceextension: ptr32 void
+ 0x02c devicetype: uint4b; device type: file_device _...
+ 0x030 stacksize: Char
+ 0x034 queue: _ unnamed
+ 0x05c alignmentrequirement: uint4b
+ 0x060 devicequeue: _ kdevice_queue
+ 0x074 DPC: _ kdpc
+ 0x094 activethreadcount: uint4b
+ 0x098 securitydescriptor: ptr32 void
+ 0x09c devicelock: _ kevent
+ 0x0ac sectorsize: uint2b
+ 0x0ae spare1: uint2b
+ 0x0b0 deviceobjectextension: ptr32 _ devobj_extension
+ 0x0b4 Reserved: ptr32 void

(1) Flag

Flag Value Description
Do_buffered_io Read/write operations use a buffer (system replication buffer) to access user-mode data
Do_exclusive Only one thread is allowed to open the device handle at a time
Do_direct_io Read/write operations use direct (memory Descriptor Table) access user mode data
Do_bus_enumerated_device Bus drivers set this flag in the PDO of each device they enumerate. this flag pertains only to the PDO; it must not be set in an fdo or filter do. therefore, higher-level drivers layered over a bus driver must not propagate this value up the device stack.
Do_device_initializing The device object is being initialized.
Do_power_inrush Drivers of devices that require Inrush Current when powering on must set this flag. A driver cannot set both this flag and do_power_pagable. Large Current is required when the device is powered on.
Do_power_pagable Windows? 2000 and later drivers that are pageable, are not part of the paging path, and do not require Inrush Current must set this flag. the system callsuch drivers at IRQL passive_level. drivers cannot set both this flag and do_power_inrush.
All WDM, Windows 98, and Windows ME drivers must set do_power_pagable. irp_mj_pnp requests must be processed at passive_level.
Do_verify_volume Removable-media drivers set this flag while processing transfer requests. Such drivers shoshould also check for this flag in the target for a transfer request before transferring any
Data. See the supporting removable media for details
   

Characteristics: contains another set of flag, which describes the optional features of the device.
File_removable_media: replaceable media device
File_read_only_device: Read-Only Device
File_floppy_diskette: Floppy Drive Device
File_write_once_mdeia: Write the device only once.
File_remote_device: the device that is accessed through a network connection.
File_device_is_mounted: The physical media is already in the device.
File_device_secure_open: Check the security attributes of the device object in the open operation.
Devicetype: an enumerative constant that describes the device type.
File_device_printer: printer
File_device_scanner: Scanner
...
File_device_unknown: Unknown Device

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.