stickyfert.blogg.se

C2100 illegal indirection
C2100 illegal indirection









c2100 illegal indirection

text:00010537 call ExAllocatePool(x,x)Īnd when targeting Windows XP using the WDK 7600.16385.1 we get an error during compilation: KNPs.cpp(102) : error C2100: illegal indirection text:00010519 mov eax, ds:_imp_KeNumberProcessors When building this for Windows 2000 (free) as target (using WDK 6001.18002), we get for the line assigning nCpus and the subsequent one. PVOID lpBuf = ExAllocatePool(NonPagedPool, nCpus * 7) You'll write this (some more code was necessary to force this code not to be optimized away): CCHAR nCpus = *KeNumberProcessors

C2100 illegal indirection driver#

Okay, so say you have an old driver targeting pre-XP Windows versions.

c2100 illegal indirection

This is possible whenever the author is careful enough not to use functions unavailable on Windows 2000, but available at compile and link time for the nominal target. However, the driver does run on Windows 2000 Professional (with SP4) as I verified. The likeliest error is: error C2100: illegal indirection.Īccording to the PE header the file was created using WDK 7600.16385.1 (OS version), targeting XP (subsystem version), assuming we can trust best practices having been used to create the driver. The source incompatibility will inevitably force that the developer notices the change of type for KeNumberProcessors from PCCHAR to CCHAR. It makes perfect sense to assume that this is deliberate once piecing all the puzzle pieces together. I still think this will create a BSOD, what's more I think that this is deliberate.











C2100 illegal indirection