Index: VBoxMF.h
===================================================================
--- VBoxMF.h	(revision 38898)
+++ VBoxMF.h	(working copy)
@@ -57,6 +57,8 @@
     VMMDevReqMouseStatus       *pSCReq;              /* Preallocated request to use in pfnServiceCB */
 
     IO_REMOVE_LOCK RemoveLock;
+    
+    DEVICE_POWER_STATE DeviceState;   /* current power state of the device */
 } VBOXMOUSE_DEVEXT, *PVBOXMOUSE_DEVEXT;
 
 /* Interface functions */
@@ -71,6 +73,7 @@
 NTSTATUS VBoxIrpPassthrough(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
 NTSTATUS VBoxIrpInternalIOCTL(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
 NTSTATUS VBoxIrpPnP(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
+NTSTATUS VBoxIrpPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
 
 /* Internal functions */
 VOID VBoxDeviceAdded(PVBOXMOUSE_DEVEXT pDevExt);
Index: VBoxMFDriver.cpp
===================================================================
--- VBoxMFDriver.cpp	(revision 38898)
+++ VBoxMFDriver.cpp	(working copy)
@@ -49,6 +49,7 @@
 
     DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = VBoxIrpInternalIOCTL;
     DriverObject->MajorFunction[IRP_MJ_PNP] = VBoxIrpPnP;
+	DriverObject->MajorFunction[IRP_MJ_POWER] = VBoxIrpPower;
 
     NTSTATUS tmpStatus = VBoxNewProtInit();
     if (!NT_SUCCESS(tmpStatus))
@@ -120,6 +121,7 @@
     pDevExt->pdoMain   = PDO;
     pDevExt->pdoSelf   = pDO;
     pDevExt->pdoParent = pDOParent;
+	pDevExt->DeviceState = PowerDeviceD0;
 
     VBoxDeviceAdded(pDevExt);
 
@@ -245,3 +247,36 @@
     LOGF_LEAVE();
     return rc;
 }
+
+NTSTATUS VBoxIrpPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
+{
+    PIO_STACK_LOCATION  irpSp;    
+	PVBOXMOUSE_DEVEXT   devExt;
+    POWER_STATE         powerState;
+    POWER_STATE_TYPE    powerType;
+
+    PAGED_CODE();
+
+    devExt = (PVBOXMOUSE_DEVEXT) DeviceObject->DeviceExtension;
+    irpSp = IoGetCurrentIrpStackLocation(Irp);
+
+    powerType = irpSp->Parameters.Power.Type;
+    powerState = irpSp->Parameters.Power.State;
+
+    switch (irpSp->MinorFunction) {
+    case IRP_MN_SET_POWER:
+        if (powerType  == DevicePowerState) {
+            devExt->DeviceState = powerState.DeviceState;
+        }
+
+    case IRP_MN_QUERY_POWER:
+    case IRP_MN_WAIT_WAKE:
+    case IRP_MN_POWER_SEQUENCE:
+    default:
+        break;
+    }
+
+    PoStartNextPowerIrp(Irp);
+    IoSkipCurrentIrpStackLocation(Irp);
+    return PoCallDriver(devExt->pdoParent, Irp);
+}
\ No newline at end of file
