Reply To: diffs between XP/w2k and NT 4.0 drivers – newbie

Home Forums Discussions Support Portal diffs between XP/w2k and NT 4.0 drivers – newbie Reply To: diffs between XP/w2k and NT 4.0 drivers – newbie


Vadim Smirnov

1. Should I use DDK NT for the migration? Is it impossible to use later DDKs? I have XP DDK that contains a libw2k, libwxp, libwnet… but no something like libwnt. I ask it because I would want to use Ntstrsafe.lib and it is *said that I can use it for NT, but there is no Ntstrsafe.lib in DDK NT.

You can use Windows XP DDK and build NT driver with Windows 2000 building environment. Just avoid using functions added in Windows 2000 kernel and missed in NT4 (most of WDM stuff). Also, don’t forget to link exsup.lib to your driver, otherwise you may get some problems with trying to load your driver on Windows NT (an example if it uses SEH).

2. When I try to compile the driver with NT DDK as we can expect I get a lot of errors… unknown symbol OBJ_KERNEL_HANDLE, unfinded ndis.h, etc. What strategies do you advice me to resolve it? should i rewrite some entire parts of the code or could I fix it with a few changes? when I comment the ndis.h include it has a great impact … i guess there is no way to use it in NT drivers… so much changed the net interface?

OBJ_KERNEL_HANDLE, was added in Windows 2000, so you better make a workaround for this (move the code which operates with handles into the context of the System thread). ndis.h presents in Windows NT DDK, so basically there should not be any real problem with it. Just be more careful with NDIS version definitions.

3 and last. Im debugging the xp version with WinDbg through a serial COM1 cable. Can you recommend me better way to do it? I mean, something with virtual machine would be enough for this job?

You can run test system under VMWare, it works just fine with WinDBG. Under Windows NT4 it may be also useful to try SoftIce (it is discontinued but for NT4 works quite well).