Compilng and Linking Windows 2000 compatible driver with DDK 2003

Hi!

I’m trying to compile my driver (running on Windows
2000, Windows XP SP1, SP2), with the new 2003 DDK.
I have a missing function problem.
First I had problem with “PsDereferencePrimaryToken”
and “PsDereferenceImpersonationToken” which changed
from Macros in Windows 2000 DDK to function in 2003
DDK - My solution was to re-define the macro and load
these functions dynamically (with
MmGetSystemRoutineAddress function)
Now I still can not load my driver due to a missing
“_alldvrm” function.
I found a thread from the past regarding this issue
but I still didn’t understand what is the solution for
the runtime problem - if any.
Generally I was told that it is better to work with
2003 DDK - I will be happy to do so AL TOUGH my driver
should still be running on Windows 2000 machines
I will be happy to know what are my options to do so
(If any…)

Thanks

Alon


Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs

“Alon Elhanani” wrote in message news:xxxxx@ntdev…
> Hi!
>
> I’m trying to compile my driver (running on Windows
> 2000, Windows XP SP1, SP2), with the new 2003 DDK.
> I have a missing function problem.
> First I had problem with “PsDereferencePrimaryToken”
> and “PsDereferenceImpersonationToken” which changed
> from Macros in Windows 2000 DDK to function in 2003
> DDK - My solution was to re-define the macro and load
> these functions dynamically (with
> MmGetSystemRoutineAddress function)
> Now I still can not load my driver due to a missing
> “_alldvrm” function.
> I found a thread from the past regarding this issue
> but I still didn’t understand what is the solution for
> the runtime problem - if any.
> Generally I was told that it is better to work with
> 2003 DDK - I will be happy to do so AL TOUGH my driver
> should still be running on Windows 2000 machines
> I will be happy to know what are my options to do so
> (If any…)
>

Yes, it is certainly best to use the latest DDK. Contrary to the distant
path, these days each new DDK offers bug fixes to (some) driver samples and
enhanced compilers and tools (e.g., PreFast).

On the other hand, if your driver is to be built to the “lowest common
denominator” (Windows 2000) you should use the Windows 2000 Build
Environment of the Windows Server 2003 DDK.

Using the latest Windows Server 2003 SP1 DDK you will find functions that
are deprecated or even removed based on the Build Environment that you
select. For example, routines that are specified to be “reserved for system
use” in the Windows Server 2003 DDK will compile and link if the Windows XP
Build Environment is used, but are missing (using the same DDK) if the
Windows Server 2003 build environment is used.

So, use 1.) the latest DDK and 2.) the 'lowest common denominator" Build
Environment from that DDK.

Good luck,

Thomas F. Divine, Windows DDK MVP
http://www.pcausa.com