Changeset 38932 in vbox for trunk/src/VBox
- Timestamp:
- Oct 3, 2011 11:22:39 AM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Mouse/NT5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMF.h
r38931 r38932 58 58 59 59 IO_REMOVE_LOCK RemoveLock; 60 61 DEVICE_POWER_STATE DeviceState; /* current power state of the device */62 60 } VBOXMOUSE_DEVEXT, *PVBOXMOUSE_DEVEXT; 63 61 -
trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMFDriver.cpp
r38931 r38932 122 122 pDevExt->pdoSelf = pDO; 123 123 pDevExt->pdoParent = pDOParent; 124 pDevExt->DeviceState = PowerDeviceD0;125 124 126 125 VBoxDeviceAdded(pDevExt); … … 251 250 NTSTATUS VBoxIrpPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) 252 251 { 253 PIO_STACK_LOCATION irpSp; 254 PVBOXMOUSE_DEVEXT devExt; 255 POWER_STATE powerState; 256 POWER_STATE_TYPE powerType; 257 258 PAGED_CODE(); 259 260 devExt = (PVBOXMOUSE_DEVEXT) DeviceObject->DeviceExtension; 261 irpSp = IoGetCurrentIrpStackLocation(Irp); 262 263 powerType = irpSp->Parameters.Power.Type; 264 powerState = irpSp->Parameters.Power.State; 265 266 switch (irpSp->MinorFunction) { 267 case IRP_MN_SET_POWER: 268 if (powerType == DevicePowerState) { 269 devExt->DeviceState = powerState.DeviceState; 270 } 271 272 case IRP_MN_QUERY_POWER: 273 case IRP_MN_WAIT_WAKE: 274 case IRP_MN_POWER_SEQUENCE: 275 default: 276 break; 277 } 278 252 PVBOXMOUSE_DEVEXT pDevExt; 253 PAGED_CODE(); 254 LOGF_ENTER(); 255 pDevExt = (PVBOXMOUSE_DEVEXT) DeviceObject->DeviceExtension; 279 256 PoStartNextPowerIrp(Irp); 280 257 IoSkipCurrentIrpStackLocation(Irp); 281 return PoCallDriver(devExt->pdoParent, Irp); 282 } 258 LOGF_LEAVE(); 259 return PoCallDriver(pDevExt->pdoParent, Irp); 260 }
Note:
See TracChangeset
for help on using the changeset viewer.