14

I'm trying to develop a driver using Visual Studio 2012, which automatically integrates with WDK.

When I try to build my driver, I receive an error message from Inf2Cat app. It says:

Errors: 2> 22.9.7: DriverVer set to incorrect date (postdated DriverVer not allowed) in \ntleg.inf. The current date (UTC) is 1/3/2013.

In my NTLeg.inf I have:

[Version]
Signature="$WINDOWS NT$"
Class=
ClassGuid=
Provider=
DriverVer=
CatalogFile=NTLeg.cat

So, DriverVerProperty is empty. I tried to fill it with any value, but Inf2Cat reports the same error. I tried to fill it with current, past and future date, the same result. What should I do?

I tried samples provided with WDK and the all are reporting this error.

Xanx
  • 545
  • 1
  • 5
  • 17

3 Answers3

34

When using StampInf to automatically populate DriverVer it uses local time not GMT, but Inf2Cat defaults to verifying in GMT (UTC). See Microsoft comments and suggestions in StampInf documentation http://msdn.microsoft.com/en-us/library/windows/hardware/ff552789(v=vs.85).aspx

Easiest fix is to change your driver package project settings for Inf2Cat to set /uselocaltime. Then the problem goes away!

evandrix
  • 6,041
  • 4
  • 27
  • 38
James Butler
  • 364
  • 3
  • 3
  • It seems that the /uselocaltime option is only available in WinDDK 8+ (doesn't work with WinDDK 7). – pqvst Sep 24 '14 at 22:59
  • 2
    lmfao. It took me like an hour of fixing errors to build a Hello World driver (KMDF) project. https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/writing-a-very-small-kmdf--driver Not my fault, they just didn't document anything. No one said that you need Windows SDK to be able to build driver projects. Same with Inf2Cat /uselocaltime. – KulaGGin Jul 21 '18 at 23:31
  • 14
    To set /uselocaltime open project properties and go here: https://i.imgur.com/lLGeL1V.png – KulaGGin Jul 21 '18 at 23:34
  • 2023 and still a problem. Screw negative GMT folk I guess. – Ryan Leach May 02 '23 at 18:48
2

Solved. Just need to wait until UTC date-time and my local date-time got the same date.

Xanx
  • 545
  • 1
  • 5
  • 17
0

You can't leave DriverVer blank. As specified here, it is required beginning with Windows 2000. Note also that the date must be specified as mm/dd/yyyy with two digits for the month and day and four digits for the year. Finally, the date must be the most recent date of any file in the package. My guess is that requirement is what's tripping you up.

Carey Gregory
  • 6,836
  • 2
  • 26
  • 47