阅读:765回复:0
packet例子中的问题
NTSTATUS
PacketOpen( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ) { POPEN_INSTANCE open; NTSTATUS status = STATUS_SUCCESS; PKEVENT pEvent = NULL; HANDLE hEvent; UNICODE_STRING ustrEventName; DebugPrint(("OpenAdapter\n")); if(DeviceObject == Globals.ControlDeviceObject) { Irp->IoStatus.Status = status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return status; } open = DeviceObject->DeviceExtension; DebugPrint(("AdapterName :%ws\n", open->AdapterName.Buffer)); IoIncrement(open); // // Check to see whether you are still bound to the adapter // if(!open->Bound) { status = STATUS_DEVICE_NOT_READY; } Irp->IoStatus.Information = 0; Irp->IoStatus.Status = status; IoCompleteRequest (Irp, IO_NO_INCREMENT); IoDecrement(open); return status; } 请问: 1:if(DeviceObject == Globals.ControlDeviceObject)的含义是什么? 2:open = DeviceObject->DeviceExtension;的含义是什么? |
|
|