DIFxCmd not installing samples

I must be missing something basic here.

  1. I reboot a VM running XP-32. It has the latest DDK installed.

  2. I use the start menu to open a cmd window with x86 free build environment.

  3. I build the command-line tool as specified by the html instructions:
    C:\WinDDK\6001.18001\src\setup\DIFxAPI\DIFxCmd>build -cZ

  4. I build a sample:
    C:\WinDDK\6001.18001\src\network\ndis\ndisprot>build -ceZ

  5. I collect the pieces together:
    Directory of C:\tmp

10/11/2010 08:44 AM

.
10/11/2010 08:44 AM ..
11/02/2006 07:21 AM 319,456 DIFxAPI.dll
10/11/2010 08:36 AM 12,288 DIFxCmd.exe
10/11/2010 09:05 AM 2,752 ndisprot.inf
10/11/2010 08:39 AM 21,888 ndisprot.sys

6. I run the sample, it fails:
C:\tmp>difxcmd /i ndisprot.inf 16
DIFxAPI Sampe Program
INFO: Option "/i"
INFO: Input file "C:\tmp\ndisprot.inf"
INFO: Flags 0x10 (16)
TEST: installing driver package.
LOG Event: 1, ENTER: DriverPackageInstallW
LOG Event: 1, Installing INF file 'C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf' of Type 6.
LOG Event: 1, Looking for Model Section [MSFT.NTx86]...
LOG Event: 1, No matching devices found in INF "C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf" on the Machine.
LOG Event: 1, No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf'.
LOG Event: 0, Installation completed with code 0xE000020B.
LOG Event: 1, RETURN: DriverPackageInstallW (0xE000020B)
INFO: There aren't any live devnodes with the DeviceId contained in the INF.

7. I add
[version]
DriverPackageType = Networks
as required by the DriverPackageInstall Function, see
http://msdn.microsoft.com/en-us/library/ff544813%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ff552334%28v=VS.85%29.aspx
(you'd think MS would have updated their .inf files)
and run again:
C:\tmp>difxcmd /i ndisprot.inf 16
DIFxAPI Sampe Program
INFO: Option "/i"
INFO: Input file "C:\tmp\ndisprot.inf"
INFO: Flags 0x10 (16)
TEST: installing driver package.
LOG Event: 1, ENTER: DriverPackageInstallW
LOG Event: 1, Copied 'ndisprot.inf' to driver store...
LOG Event: 1, Commiting queue...
LOG Event: 1, Copied file: 'C:\tmp\ndisprot.sys' -> 'C:\WINDOWS\system32\DRVSTORE\ndisprot_AF120FA26C33FDC52476FA364B843FA329A8829A\ndisprot.sys'.
LOG Event: 3, Could not obtain installer information for driver C:\WINDOWS\system32\DRVSTORE\ndisprot_AF120FA26C33FDC52476FA364B843FA329A8829A\ndisprot.inf
LOG Event: 3, Error = 13, The driver installation failed. Attempting to undo system changes ...
LOG Event: 1, Driver Store entry '' removed.
LOG Event: 1, RETURN: DriverPackageInstallW (0xD)
ERROR: failed with error code 0xD

[error 13 is ERROR_INVALID_DATA]

8. I repeat the process with passthru.sys with the same results: fails with 0xE000020B then 0xD after adding DriverPackageType.

9. So quite clearly I am missing something simple. Google does not show other people complaining about this. Does anyone have a clue as to where I am going wrong?

Try

DriverPackageType=Network

There is no ‘s’ on the end.

Good Luck,
Dave Cattley

Date: Wed, 13 Oct 2010 12:29:56 -0400
From: xxxxx@olivebr.com
To: xxxxx@lists.osr.com
Subject: [ntdev] DIFxCmd not installing samples

I must be missing something basic here.

  1. I reboot a VM running XP-32. It has the latest DDK installed.

  2. I use the start menu to open a cmd window with x86 free build environment.

  3. I build the command-line tool as specified by the html instructions:
    C:\WinDDK\6001.18001\src\setup\DIFxAPI\DIFxCmd>build -cZ

  4. I build a sample:
    C:\WinDDK\6001.18001\src\network\ndis\ndisprot>build -ceZ

  5. I collect the pieces together:
    Directory of C:\tmp

10/11/2010 08:44 AM

.
> 10/11/2010 08:44 AM ..
> 11/02/2006 07:21 AM 319,456 DIFxAPI.dll
> 10/11/2010 08:36 AM 12,288 DIFxCmd.exe
> 10/11/2010 09:05 AM 2,752 ndisprot.inf
> 10/11/2010 08:39 AM 21,888 ndisprot.sys
>
> 6. I run the sample, it fails:
> C:\tmp>difxcmd /i ndisprot.inf 16
> DIFxAPI Sampe Program
> INFO: Option "/i"
> INFO: Input file "C:\tmp\ndisprot.inf"
> INFO: Flags 0x10 (16)
> TEST: installing driver package.
> LOG Event: 1, ENTER: DriverPackageInstallW
> LOG Event: 1, Installing INF file 'C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf' of Type 6.
> LOG Event: 1, Looking for Model Section [MSFT.NTx86]...
> LOG Event: 1, No matching devices found in INF "C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf" on the Machine.
> LOG Event: 1, No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\system32\DRVSTORE\ndisprot_9639EB185DCBF1B359F0E31593C29CBB0606C865\ndisprot.inf'.
> LOG Event: 0, Installation completed with code 0xE000020B.
> LOG Event: 1, RETURN: DriverPackageInstallW (0xE000020B)
> INFO: There aren't any live devnodes with the DeviceId contained in the INF.
>
> 7. I add
> [version]
> DriverPackageType = Networks
> as required by the DriverPackageInstall Function, see
> http://msdn.microsoft.com/en-us/library/ff544813%28VS.85%29.aspx
> http://msdn.microsoft.com/en-us/library/ff552334%28v=VS.85%29.aspx
> (you'd think MS would have updated their .inf files)
> and run again:
> C:\tmp>difxcmd /i ndisprot.inf 16
> DIFxAPI Sampe Program
> INFO: Option "/i"
> INFO: Input file "C:\tmp\ndisprot.inf"
> INFO: Flags 0x10 (16)
> TEST: installing driver package.
> LOG Event: 1, ENTER: DriverPackageInstallW
> LOG Event: 1, Copied 'ndisprot.inf' to driver store...
> LOG Event: 1, Commiting queue...
> LOG Event: 1, Copied file: 'C:\tmp\ndisprot.sys' -> 'C:\WINDOWS\system32\DRVSTORE\ndisprot_AF120FA26C33FDC52476FA364B843FA329A8829A\ndisprot.sys'.
> LOG Event: 3, Could not obtain installer information for driver C:\WINDOWS\system32\DRVSTORE\ndisprot_AF120FA26C33FDC52476FA364B843FA329A8829A\ndisprot.inf
> LOG Event: 3, Error = 13, The driver installation failed. Attempting to undo system changes ...
> LOG Event: 1, Driver Store entry '' removed.
> LOG Event: 1, RETURN: DriverPackageInstallW (0xD)
> ERROR: failed with error code 0xD
>
> [error 13 is ERROR_INVALID_DATA]
>
> 8. I repeat the process with passthru.sys with the same results: fails with 0xE000020B then 0xD after adding DriverPackageType.
>
> 9. So quite clearly I am missing something simple. Google does not show other people complaining about this. Does anyone have a clue as to where I am going wrong?
>
>
>
> ---
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> Try DriverPackageType=Network There is no ‘s’ on the end.

Sharp eye! But that was a typo in the post; just checked my .inf files and they’re singular.

DriverPackageType=Network packages require you to provide a non-null data
the AppInfo (AppId, DisplayName, ProductName, MfgName).

Use AppDrv instead.

Fabulously well documented, I know. Just wait to you get to trying to
update your NetService…

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@olivebr.com
Sent: Wednesday, October 13, 2010 6:21 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DIFxCmd not installing samples

Try DriverPackageType=Network There is no ‘s’ on the end.

Sharp eye! But that was a typo in the post; just checked my .inf files and
they’re singular.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> Use AppDrv instead
Great! I just needed to add the DRIVER_PACKAGE_LEGACY_MODE flag. Thanks for your help.

Phil