On WDK “Building a Multiversion Driver Using Version-Dependent Features”
section, I read:
"Conditionally Calling DDIs Based on Windows Version
After a driver determines that a given DDI version is available on the
computer that it is running on, that driver can dynamically locate the
routine and call it through a pointer by using the MmGetSystemRoutineAddress
function. This function was introduced in Windows 2000 and is available on
all Windows computers that the WDK supports.
Note To help preserve type checking and prevent unintentional errors, you
should create a typedef that mirrors the original function type.
…
typedef (* PAISQSL) (KeAcquireInStackQueuedSpinLock);
PAISQSL AcquireInStackQueued = NULL;
Note that the C language syntax that the preceding typedef shows is a new,
simplified, form of the following, more traditional, syntax.
typedef void (FASTCALL * PAISQSL)(IN PKSPIN_LOCK Spinlock,
IN PKLOCK_QUEUE_HANDLE LockHandle);
PAISQSL AcquireInStackQueued = NULL;
…
The new syntax enables you to declare a pointer to a function without having
to restate the calling convention or parameters of the function. This new
syntax is supported by the compiler that is supplied with the Windows Server
2003 DDK."
Now the question. This multiversion driver with version-dependent features
must be builded using
the build environment for oldest O/S version, so how is possible to use this
new syntax for this purpose when function prototypes are not exposed NEVER
for the oldest target version in this scenario?.
Thanks,
mK
Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/