3、有返回值在声明时加上 #pragmaLOCKEDCODE示例:在使用StartIO例程时,需要IRP的派遣函数返回挂起状态。调用[cpp] viewplaincopyprint?1.VOID 2. IoStartPacket( 3. IN PDEVICE_OBJECT DeviceObject, 4. IN PIRP Irp, 5. IN PULONG Key OPTIONAL, //If this is zero, the packet is
4、 inserted at the tail of the device queue. 6. IN PDRIVER_CANCEL CancelFunction OPTIONAL //Specifies the entry point for a driver-supplied Cancel routine. 7. ); [cpp] viewplaincopyprint?1.VOID 2. IoStartNextPacket( 3. IN PDEVICE_OBJECT Devic
5、eObject, 4. IN BOOLEAN Cancelable 1. ); [cpp] viewplaincopyprint?1.BOOLEAN 2. KeRemoveEntryDeviceQueue( //从设备队列中将该IRP抽取出来 3. IN PKDEVICE_QUEUE DeviceQueue, 4. IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry 5. ); StartIO例程