阅读:1856回复:3
ddk中portio例子中不明白的地方,请教(2)
genport.c文件,在GpdAddDevice例程中,用 IoCreateDevice创建的设备对象deviceObject,在该例程的结尾处有两条语句不明白:
1。deviceObject->Flags |= DO_POWER_PAGABLE; 2。deviceObject->Flags &= ~DO_DEVICE_INITIALIZING; 我查看了ntddk.h知道: #define DO_POWER_PAGABLE 0x00002000 #define DO_DEVICE_INITIALIZING 0x00000080 我的问题是: 1。deviceObject->Flags 在GpdAddDevice例程中的默认值是多少 2。deviceObject->Flags |= DO_POWER_PAGABLE该语句的作用是什么? 我查看DDK文挡(1.2.2 Setting Device Object Flags for Power Management)说:On Windows 2000, drivers of devices that are in the paging path must not set the DO_POWER_PAGABLE flag.(处于分页路径的驱动程序不能设置此位) 隔了一段又有Windows 2000 drivers that can be paged must set the DO_POWER_PAGABLE flag. (可以分页的驱动程序必须设置此段),困惑 :( |
|