VirtualBox

Ignore:
Timestamp:
Jun 19, 2007 12:23:23 PM (18 years ago)
Author:
vboxsync
Message:

Must pass on IRP_MJ_SYSTEM_CONTROL to the next driver in the chain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp

    r3156 r3157  
    5454static NTSTATUS VBoxGuestClose(PDEVICE_OBJECT pDevObj, PIRP pIrp);
    5555static NTSTATUS VBoxGuestDeviceControl(PDEVICE_OBJECT pDevObj, PIRP pIrp);
     56static NTSTATUS VBoxGuestSystemControl(PDEVICE_OBJECT pDevObj, PIRP pIrp);
    5657static NTSTATUS VBoxGuestShutdown(PDEVICE_OBJECT pDevObj, PIRP pIrp);
    5758static NTSTATUS VBoxGuestNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp);
     
    153154    pDrvObj->MajorFunction[IRP_MJ_PNP]                = VBoxGuestPnP;
    154155    pDrvObj->MajorFunction[IRP_MJ_POWER]              = VBoxGuestPower;
    155     pDrvObj->MajorFunction[IRP_MJ_SYSTEM_CONTROL]     = VBoxGuestNotSupportedStub;
     156    pDrvObj->MajorFunction[IRP_MJ_SYSTEM_CONTROL]     = VBoxGuestSystemControl;
    156157    pDrvObj->DriverExtension->AddDevice               = (PDRIVER_ADD_DEVICE)VBoxGuestAddDevice;
    157158#endif
     
    761762
    762763    return Status;
     764}
     765
     766
     767/**
     768 * IRP_MJ_SYSTEM_CONTROL handler
     769 *
     770 * @returns NT status code
     771 * @param   pDevObj     Device object.
     772 * @param   pIrp        IRP.
     773 */
     774NTSTATUS VBoxGuestSystemControl(PDEVICE_OBJECT pDevObj, PIRP pIrp)
     775{
     776    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
     777
     778    dprintf(("VBoxGuest::VBoxGuestSystemControl\n"));
     779
     780    /* Always pass it on to the next driver. */
     781    IoSkipCurrentIrpStackLocation(pIrp);
     782
     783    return IoCallDriver(pDevExt->nextLowerDriver, pIrp);
    763784}
    764785
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette