Updating wdf header files

I have found that many of the default wdf header files on my computer have errors so every time I try to build a driver I get around 50 errors referencing wdf header files e.g. wdfglobals.h, wdfmemory.h, wdftypes.h etc. Is there no easy way I can update them somehow as the last thing I want is to get bogged down with such errors. I have not modified any of these files in any way, so I’m not sure how they became corrupted.

Go to add remove programs, select the wdk and choose repair.

d

Bent from my phone


From: xxxxx@edu.salford.ac.ukmailto:xxxxx
Sent: ?1/?13/?2015 5:21 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Updating wdf header files

I have found that many of the default wdf header files on my computer have errors so every time I try to build a driver I get around 50 errors referencing wdf header files e.g. wdfglobals.h, wdfmemory.h, wdftypes.h etc. Is there no easy way I can update them somehow as the last thing I want is to get bogged down with such errors. I have not modified any of these files in any way, so I’m not sure how they became corrupted.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

xxxxx@edu.salford.ac.uk wrote:

I have found that many of the default wdf header files on my computer have errors so every time I try to build a driver I get around 50 errors referencing wdf header files e.g. wdfglobals.h, wdfmemory.h, wdftypes.h etc.

It would be interesting to know what kind of errors you are seeing. You
will get many miscellaneous errors if you match the WDF header files
with the wrong SDK. Each WDK release is designed to mate with exactly
one SDK.


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

Still getting the problem. I’m using Windows 8.1 and got WDK and SDK for windows 8.1 so should be compatible. I’m getting 407 errors and 155 warnings from the following header files:

wdffileobject.h
wdfchildlist.h
wdfmemory.h
wdm.h
wdmsec.h
wdfassert.h
WdfQueryInterface.h
wdfdriver.h
wdfsync.h
wdfobject.h
wdfverifier.h
wdffuncenum.h
wdfglobals.h
wdftypes.h

What is a sampling of the errors and warning messages you are seeing? Sounds like a config issue in the project, not the installed files

d

Bent from my phone


From: xxxxx@edu.salford.ac.ukmailto:xxxxx
Sent: ?1/?13/?2015 6:25 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Updating wdf header files

Still getting the problem. I’m using Windows 8.1 and got WDK and SDK for windows 8.1 so should be compatible. I’m getting 407 errors and 155 warnings from the following header files:

wdffileobject.h
wdfchildlist.h
wdfmemory.h
wdm.h
wdmsec.h
wdfassert.h
WdfQueryInterface.h
wdfdriver.h
wdfsync.h
wdfobject.h
wdfverifier.h
wdffuncenum.h
wdfglobals.h
wdftypes.h


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

The following are samples:
warning C4131: ‘DECLARE_HANDLE’ : uses old-style declarator
warning C4218: nonstandard extension used : must specify at least a storage class or a type
error C2061: syntax error : identifier ‘WDFCONTEXT’
error C2059: syntax error : ‘;’
error C2061: syntax error : identifier ‘WDFOBJECT’
error C2061: syntax error : identifier ‘BYTE’
error C2059: syntax error : ‘constant’
error C2061: syntax error : identifier ‘EVT_WDF_OBJECT_CONTEXT_DESTROY’
error C2065: ‘WdfFunctions’ : undeclared identifier

The settings in the configuration manager seem to be in order with windows 8.1 options selected. I have not modified any settings since my previous driver which was a basic helloworld driver that worked.

I’m getting the same problem for a simple HelloWorld driver now so I know it’s got nothing to do with circular dependencies. I’ve tried reinstalling SDK and WDK so not sure what the problem is. What do you guys think I can do now since I can’t really build any drivers at the moment.

Did you install any software in the recent past? It could somehow be interfering with msbuild

d

Bent from my phone


From: xxxxx@edu.salford.ac.ukmailto:xxxxx
Sent: ?1/?14/?2015 7:06 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Updating wdf header files

I’m getting the same problem for a simple HelloWorld driver now so I know it’s got nothing to do with circular dependencies. I’ve tried reinstalling SDK and WDK so not sure what the problem is. What do you guys think I can do now since I can’t really build any drivers at the moment.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

I’ve deleted such software though still getting errors.

Did you try building one of the official WDK sample projects? https://code.msdn.microsoft.com/windowshardware/Windows-8-Driver-Samples-5e1aa62e

I’ve deleted such software though still getting errors.

What software was that? Maybe it changed some environment variables that still linger and mess with build.

xxxxx@edu.salford.ac.uk wrote:

I’ve deleted such software though still getting errors.

Would you mind cutting and pasting EXACTLY the first couple dozen
errors? With that information, perhaps we might be able to figure out
if there is one definition or one prerequisite file that is bad.


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

The first error is driverspecs.h not found. I know wdf.h tries to import this, I have tried searching for this and could not find this on my computer, What do I need to download to get this header file?

On my system with SDK+WDK installed, I see driverspecs.h in C:\Program Files (x86)\Windows Kits\8.1\Include\shared. It looks like there’s something wrong with your dev setup.

Have you googled this problem? Just google for “driverspecs.h”.

This doesn’t find a specific solution. However, it does suggest that there
is a serious problems in the order that software components were installed.

Unfortunately there isn’t a “cookbook” way to fix this problem. Most
developers who have been around probably encountered this problem at least
once a long time ago. Now they don’t see the problem anymore because they
are VERY careful about the order that they install software on a development
machine. It’s a ritual that you follow carefully.

Sorry for your loss…

Thomas F. Divine

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@edu.salford.ac.uk
Sent: Thursday, January 15, 2015 5:04 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Updating wdf header files

The first error is driverspecs.h not found. I know wdf.h tries to import
this, I have tried searching for this and could not find this on my
computer, What do I need to download to get this header file?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

xxxxx@edu.salford.ac.uk wrote:

The first error is driverspecs.h not found. I know wdf.h tries to import this, I have tried searching for this and could not find this on my computer, What do I need to download to get this header file?

Did you download and install – in this order – Visual Studio 2013, the
Windows 8.1 SDK, and the Windows 8.1 WDK? Did you alter any of the
paths when you installed?


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

Sorted the problem out guys, still getting a few errors though they are more relevant to my program rather than wdf files etc.

The problem was that I was including wdf before ntddk.

What a waste of 3 days, all it took was to include ntddk.h before wdf.h.

Thanks for all the help.

Remember yesterday, Mr. Margarit asked you to “try building one of the official WDK sample projects”? This was why he suggested that.

I must admit (embarrassing though it may be) that I’ve done this myself. And while it didn’t take me three days to fix it, it did cause me to scratch my head and wonder for a bit.

I’m not sure why WDF.H doesn’t automatically include WDM.H, given that it’s a clear prerequisite. In the user wants to ALSO include the bits from NTDDK.H or NTIFS.H or whatever I *do* believe the lower-level headers (in the include hierarchy) are protected from multiple inclusion. If not, that would be the reason why things weren’t structure this way by default.

Maybe one of the WDF devs could enlighten us, because I’m sure they thought of this.

Peter
OSR
@OSRDrivers