How to add power management function into WFP driver

Answered How to add power management function into WFP driver

  • Wednesday, May 16, 2012 9:39 AM
     
     

    Hi,

    I have wroten a WFP driver, its objective is for capturing connection between outbound packet and process (get process ID and network packet 5 tuples), it works well.

    In driver, I simply support power management with following sample codes:

    if(IrpStack->MajorFunction ==IRP_MJ_POWER )

    {   
        Irp->IoStatus.Status = Status;
        IoCompleteRequest(Irp, IO_NO_INCREMENT);

    }

    When I tried to pass WHCK test, job 1798(power management support) fails, and I does not konw root reason, please help me, if possible, please give me some sample code snatch.

    If you have any question, please tell me here.

    Thanks,

    Rick Wang

All Replies

  • Thursday, May 17, 2012 5:12 AM
    Moderator
     
     Answered

    please post the log for the failing job (on the machine under test it will be %WinDir%\System32\Filter.Driver.WindowsFilteringPlatform.ArchitecturalDesign.SupportPowerManagedStates.NTLog

    For a sample of how to handle power states, you can look at the WFPSampler:
       http://code.msdn.microsoft.com/Windows-Filtering-Platform-27553baa in sys\Framework_PowerStates.cpp

    Thanks,


    Dusty Harper [MSFT]
    Microsoft Corporation
    ------------------------------------------------------------
    This posting is provided "AS IS", with NO warranties and confers NO rights
    ------------------------------------------------------------

    • Marked As Answer by Haiboz Thursday, May 17, 2012 1:53 PM
    •  
  • Thursday, May 17, 2012 1:53 PM
     
     

    Thank you very much! I have fixed the issue.