This sounds like the old issue. Well, it still remains as very
possible issue with the latest W7 WDK.
If one file includes wdm.h and the other includes ntddk.h or ntifs.h
or FltKernel.h and the code uses KeInitializeSpinLock, there will be
linker errors on both x86.
The problem is with WDM_INCLUDED define. It's defined when WDM.h was
included without ntddk.h or other two before it. The function is forced
non-inline on x86 if ntddk/ntifs/FltKernel are used but is used as
export if wdm is used.
OK, not many will include different header files, but it's a bug
nonetheless. And it just made me rewrite a C++ library that only used
wdm.h because it gave out linker errors
FYI for everyone, and I hope MS changes this to the same state
regardless of which header in included (I don't see a reason why it
would not be inline everywhere, can there possibly be anything more the
Ntoskrnl version does for a spin lock apart from tracking?)
Kind regards, Dejan (MSN support: firstname.lastname@example.org)http://www.alfasp.com
File system audit, security and encryption kits.