Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category, below.

USBDevice class not present in Win7 32?

I have a driver that uses the USBDevice Class, which is listed by MSFT as a System-Defined device setup class available to vendors (https://docs.microsoft.com/en-us/windows-hardware/drivers/install/system-defined-device-setup-classes-available-to-vendors)

Per universal driver rules, I removed the [ClassInstall32] section of my INF and now in Win 7 32 i'm getting the following error during install:

ndv: Class {88bae032-5a81-49f0-bc3d-a4ff138216d6} does not exist.
dvi: {Installing Class}
inf: Opened PNF: 'D:\windows\System32\DriverStore\FileRepository\fl6kdev.inf_x86_neutral_7dab5a750504797e\fl6kdev.inf' ([strings])
dvi: Installing device class: 'USBDevice' {88BAE032-5A81-49f0-BC3D-A4FF138216D6}.
!!! dvi: Could not locate section [ClassInstall32].
!!! dvi: Class: {88BAE032-5A81-49f0-BC3D-A4FF138216D6}. Install failed.
!!! dvi: Error 0xe0000101: The required section was not found in the INF.
dvi: {Installing Class exit(0xe0000101)}

If i have to use a separate inf file for Win 7 that includes the [ClassInstall32] section to install this class I can live with that but is there a way to get StampINF to only issue a warning for having a [ClassInstall32] section?
I would really prefer not to have to build the Win 7 version of the driver with an older version of the WDK.

Any suggestions or thoughts on the best way to handle this with the minimum duplication.

Thanks,
Eric

Comments

  • Doron_HolanDoron_Holan Posts: 10,353
    Do you mean infverif, not stampinf ? Don't pass the /D flag on the command line and the win7 version will pass.

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
    Sent: Wednesday, January 3, 2018 12:51:47 PM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] USBDevice class not present in Win7 32?

    I have a driver that uses the USBDevice Class, which is listed by MSFT as a System-Defined device setup class available to vendors (https://na01.safelinks.protection.outlook.com/?url=https://docs.microsoft.com/en-us/windows-hardware/drivers/install/system-defined-device-setup-classes-available-to-vendors&data=02|01|[email protected]|7a0f11d6718240056e6708d552ebc540|72f988bf86f141af91ab2d7cd011db47|1|0|636506095190099432&sdata=a3fq637ioj7bNdZKI6BIEJsmSxRmEY5nHDtxCYIHRDM=&reserved=0)

    Per universal driver rules, I removed the [ClassInstall32] section of my INF and now in Win 7 32 i'm getting the following error during install:

    ndv: Class {88bae032-5a81-49f0-bc3d-a4ff138216d6} does not exist.
    dvi: {Installing Class}
    inf: Opened PNF: 'D:\windows\System32\DriverStore\FileRepository\fl6kdev.inf_x86_neutral_7dab5a750504797e\fl6kdev.inf' ([strings])
    dvi: Installing device class: 'USBDevice' {88BAE032-5A81-49f0-BC3D-A4FF138216D6}.
    !!! dvi: Could not locate section [ClassInstall32].
    !!! dvi: Class: {88BAE032-5A81-49f0-BC3D-A4FF138216D6}. Install failed.
    !!! dvi: Error 0xe0000101: The required section was not found in the INF.
    dvi: {Installing Class exit(0xe0000101)}

    If i have to use a separate inf file for Win 7 that includes the [ClassInstall32] section to install this class I can live with that but is there a way to get StampINF to only issue a warning for having a [ClassInstall32] section?
    I would really prefer not to have to build the Win 7 version of the driver with an older version of the WDK.

    Any suggestions or thoughts on the best way to handle this with the minimum duplication.

    Thanks,
    Eric

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • I'm guessing you meant the InfVerif WDK test fails because of this. Unfortunately the USBDevice class has a fairly hard fork in INF usage between Win10 and Win7, where Win10 sees this as an MS-defined class and Win7 doesn't. Your solution of only having ClassInstall32 for Win7 sounds good to me.

    It's been a while since I've set it up, but if the WDK still allows you to not select Win10 as a targeted OS (anything pre-Win10 should be fine), InfVerif will not run and you should be fine. I think you'll have to do two WDK runs, though.

    From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@microsoft.com
    Sent: Wednesday, January 3, 2018 2:35 PM
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] USBDevice class not present in Win7 32?

    Do you mean infverif, not stampinf ? Don't pass the /D flag on the command line and the win7 version will pass.

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com > on behalf of xxxxx@yahoo.com >
    Sent: Wednesday, January 3, 2018 12:51:47 PM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] USBDevice class not present in Win7 32?

    I have a driver that uses the USBDevice Class, which is listed by MSFT as a System-Defined device setup class available to vendors (https://na01.safelinks.protection.outlook.com/?url=https://docs.microsoft.com/en-us/windows-hardware/drivers/install/system-defined-device-setup-classes-available-to-vendors&data=02|01|[email protected]|7a0f11d6718240056e6708d552ebc540|72f988bf86f141af91ab2d7cd011db47|1|0|636506095190099432&sdata=a3fq637ioj7bNdZKI6BIEJsmSxRmEY5nHDtxCYIHRDM=&reserved=0)

    Per universal driver rules, I removed the [ClassInstall32] section of my INF and now in Win 7 32 i'm getting the following error during install:

    ndv: Class {88bae032-5a81-49f0-bc3d-a4ff138216d6} does not exist.
    dvi: {Installing Class}
    inf: Opened PNF: 'D:\windows\System32\DriverStore\FileRepository\fl6kdev.inf_x86_neutral_7dab5a750504797e\fl6kdev.inf' ([strings])
    dvi: Installing device class: 'USBDevice' {88BAE032-5A81-49f0-BC3D-A4FF138216D6}.
    !!! dvi: Could not locate section [ClassInstall32].
    !!! dvi: Class: {88BAE032-5A81-49f0-BC3D-A4FF138216D6}. Install failed.
    !!! dvi: Error 0xe0000101: The required section was not found in the INF.
    dvi: {Installing Class exit(0xe0000101)}

    If i have to use a separate inf file for Win 7 that includes the [ClassInstall32] section to install this class I can live with that but is there a way to get StampINF to only issue a warning for having a [ClassInstall32] section?
    I would really prefer not to have to build the Win 7 version of the driver with an older version of the WDK.

    Any suggestions or thoughts on the best way to handle this with the minimum duplication.

    Thanks,
    Eric

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Hi Doron,
    That sounds like what i'm looking for but doesn't seem to work even on the command line:

    C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86>infverif /D FL6KDev.inf
    ERROR(1285) in C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86\FL6KDev.inf, line 13: Cannot specify [ClassInstall32] section for Microsoft-defined class.

    I'm using infverif from WDK for 1703.

    Also, I would like to pass the option when building from both VS and on the command line with MSBuild. I added the following property which i can see from logs is being picked up but it doesn't resolve the error either. Since the command line also fails, I can't tell, is this the correct way to pass the /D on to InfVerif?
    <InfVerif_AdditionalOptions>"/v /D "</InfVerif_AdditionalOptions>

    What did I miss?

    Thanks,
    Eric
  • Doron_HolanDoron_Holan Posts: 10,353
    You don't want /D on the command line. /D is what is flagging the class install 32 section. As Zac said, you should have two VS driver package projects, one for each of the INFs. The WIN7 inf should have win7 as the OS target in the project settings (which will prevent /D from being added to the command line), the win10 INF should have win10 as the target os in the project settings.

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
    Sent: Thursday, January 4, 2018 12:02:50 AM
    To: Windows System Software Devs Interest List
    Subject: RE:[ntdev] USBDevice class not present in Win7 32?

    Hi Doron,
    That sounds like what i'm looking for but doesn't seem to work even on the command line:

    C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86>infverif /D FL6KDev.inf
    ERROR(1285) in C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86\FL6KDev.inf, line 13: Cannot specify [ClassInstall32] section for Microsoft-defined class.

    I'm using infverif from WDK for 1703.

    Also, I would like to pass the option when building from both VS and on the command line with MSBuild. I added the following property which i can see from logs is being picked up but it doesn't resolve the error either. Since the command line also fails, I can't tell, is this the correct way to pass the /D on to InfVerif?
    "/v /D "

    What did I miss?

    Thanks,
    Eric

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Hi Zac & Doron,
    I'm still having issues. I created a new KMDF driver project using VS to simplify things.
    After changing the Class & ClassGuid in the inf to USBDevice and {88BAE032-5A81-49f0-BC3D-A4FF138216D6}, i get the same error, which is expected.

    I then changed the Target OS Version in the project properties under Driver Settings->General from the default "Windows 10 or higher" to "Windows 7" and tried building but got the same error about the device class.
    I also tried setting the "Target Platform" as Desktop just in case it defaults to universal but that didn't help.

    In VS project properties there are several places that talk about target versions besides the one i changed.
    General -> Target Platform, which can't be changed directly but seems to be tied to General -> Target Platform Version. which looks to specify which WDK version is being used. Do i need to use a Win 8.1 WDK?

    Is there some other setting i missed?

    Thanks again for your help
    Eric
  • Looks like the WDK runs InfVerif even if the project targets Win7 specifically. I think you can avoid this issue by editing the WindowsDriver.Common.Targets file in the WDK.

    General from the default "Windows 10 or higher" to "Windows 7" and tried building but got the same error about the device class.
    I also tried setting the "Target Platform" as Desktop just in case it defaults to universal but that didn't help.

    In VS project properties there are several places that talk about target versions besides the one i changed.
    General -> Target Platform, which can't be changed directly but seems to be tied to General -> Target Platform Version. which looks to specify which WDK version is being used. Do i need to use a Win 8.1 WDK?

    Is there some other setting i missed?

    Thanks again for your help
    Eric



    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/showlists.cfm?list=ntdev&amp;data=02|01|[email protected]|12734d2fdf8a4e8f50c408d553a49af2|72f988bf86f141af91ab2d7cd011db47|1|0|636506889069063422&amp;sdata=LCFieBOyLOmc2/MC+2pZE7BF69Xm1NCeo56haNE3TCU=&amp;reserved=0&gt;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <https://na01.safelinks.protection.outlook.com/?url=http://www.osr.com/seminars&amp;data=02|01|[email protected]|12734d2fdf8a4e8f50c408d553a49af2|72f988bf86f141af91ab2d7cd011db47|1|0|636506889069063422&amp;sdata=EnrBh5D173xC53p8V3krDA2s+mzuN3yrJJrhRa5bEF4=&amp;reserved=0&gt;

    To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/page.cfm?name=ListServer&amp;data=02|01|[email protected]|12734d2fdf8a4e8f50c408d553a49af2|72f988bf86f141af91ab2d7cd011db47|1|0|636506889069063422&amp;sdata=B7bOzP1OZYpZQ+FZVeddy5+G7lXDulNefbLxzEzUJus=&amp;reserved=0&gt;
  • Tim_RobertsTim_Roberts Posts: 12,566
    xxxxx@yahoo.com wrote:
    > Hi Doron,
    > That sounds like what i'm looking for but doesn't seem to work even on the command line:
    >
    > C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86>infverif /D FL6KDev.inf
    > ERROR(1285) in C:\src\eHost_xHCI\ref_trunk\FL6KDev\Release\x86\FL6KDev.inf, line 13: Cannot specify [ClassInstall32] section for Microsoft-defined class.
    >
    > I'm using infverif from WDK for 1703.

    Right.  The problem is essentially unsolvable.  USBDevice is a
    Microsoft-defined class starting in Windows 10.  It is totally unknown
    prior to that.  You cannot write one INF file using that install class
    that both passes the Win 10 verifier and installs correctly on earlier
    systems.

    Note that Doron's suggestion was to NOT include /D.  Since the InfVerif
    command line is built inside a DLL, I'm not sure how you'd do that in a
    vcxproj file.

    Zac's suggestions was to set your target operating system to an earlier
    system, so that infverif would simply not run.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!