none
Static Driver Verifier scanning error - ndis.h error RRS feed

  • Question

  • Hi,

    My environment is virtual studio 2012 and WDK 8.0.

    I have run code analysis on my ndis miniport driver, it passed with no error found. 

    And then, I run static driver verifier tool, the problem occurred and it shows "SDV encountered errors when scanning the driver. Please ensure roletypes are present and/or consult SDV document." at linking time.

    In the meanwhile, the SDV log has some information about ndis.h:

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12765) : error C2016: C requires that a struct or union has at least one member

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12765) : error C2061: syntax error : identifier 'FLOWSPEC'

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12766) : error C2061: syntax error : identifier 'Receive'

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12766) : error C2059: syntax error : ';'

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12768) : error C2059: syntax error : '}'

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12807) : error C2061: syntax error : identifier 'PCO_CALL_MANAGER_PARAMETERS'

    C:\Program Files (x86)\Windows Kits\8.0\Include\KM\ndis.h(12809) : error C2059: syntax error : '}'

    SDV encountered errors when scanning the driver. Please ensure roletypes are present and/or consult SDV documentation.

    I think the structure in ndis.h is correct and I don't use any FLOWSPEC related structures or routines in my driver.

    typedef struct _flowspec  //the FLOWSPEC structure defined in qos.h
    {
        ULONG       TokenRate;              /* In Bytes/sec */
        ULONG       TokenBucketSize;        /* In Bytes */
        ULONG       PeakBandwidth;          /* In Bytes/sec */
        ULONG       Latency;                /* In microseconds */
        ULONG       DelayVariation;         /* In microseconds */
        SERVICETYPE ServiceType;
        ULONG       MaxSduSize;             /* In Bytes */
        ULONG       MinimumPolicedSize;     /* In Bytes */

    } FLOWSPEC, *PFLOWSPEC, * LPFLOWSPEC;

    So far, I have checked the roletypes documents on msdn and make all functions it mentioned to declare correctly.

    (http://msdn.microsoft.com/en-us/library/windows/hardware/ff552825(v=vs.85).aspx)

    However, the error is still pop up by static driver verifier.

    I have no idea to check this problem anymore.

    Does anything else I can check?

    Many thanks.



    • Edited by iikolan Friday, March 7, 2014 6:18 AM
    Friday, March 7, 2014 6:15 AM

Answers

  • I am sorry that you have this issue.  This is most likely a bug in SDV.  Not in your driver.

    These sort of issues happens once in a while and are tricky for us to debug: SDV replaces parts of the NDIS header file for the purpose of its analysis and once in a blue moon this can lead to a tricky conflict.  We have not seen this particular conflict before, so we need to understand what is special for your compilation relative to the standard NDIS template driver.

    My first advice to you is to move to VS2013 and WDK 8.1.  This may or may not be an option for you.  And it may or may not resolve the problem.

    If you send the .\SDV folder zipped up to DriverQualityTools@Microsoft.com then we can take a deeper look.

    Friday, March 7, 2014 11:57 PM

All replies

  • I am sorry that you have this issue.  This is most likely a bug in SDV.  Not in your driver.

    These sort of issues happens once in a while and are tricky for us to debug: SDV replaces parts of the NDIS header file for the purpose of its analysis and once in a blue moon this can lead to a tricky conflict.  We have not seen this particular conflict before, so we need to understand what is special for your compilation relative to the standard NDIS template driver.

    My first advice to you is to move to VS2013 and WDK 8.1.  This may or may not be an option for you.  And it may or may not resolve the problem.

    If you send the .\SDV folder zipped up to DriverQualityTools@Microsoft.com then we can take a deeper look.

    Friday, March 7, 2014 11:57 PM
  • Thanks Doron,

    I have emailed the sdv folder zipped to MS's email  DriverQualityTools@Microsoft.com.

    Hope I will get the reply.

    Furthermore, I will check if vs2013 and WDK 8.1 can resolve the problem.

    Monday, March 10, 2014 9:54 AM