From: Hugo gleaves on
I'm interested in the subject of writing code that runs in kernel mode. Not
just device drivers, but general development of software or products that are
able to have some parts run in kernel mode.

The DDK (I assume) is all about the device driver model and how to code
drivers that fit that model. But do MS ever expose or even discuss the more
general issue of exploiting kernel mode for non-driver stuff?

For example if I wanted to write a few functions that run in some kernel
thread after system bootup, "looking" for certain things.

Or coding some functions that are able to allocate bits of the non-paged
pool for tracking other applications etc.

It strikes me that there could be a general programming model that exposes
some useful kernel stuff for non-driver purposes.

Now a separate question: what is the best, up to date book on device driver
coding, like Vista/W7 stuff too, lots of details etc.

I have some good books but thare dated in the 1990s.

Hugo

From: Don Burn on
Just because the DDK now WDK describes device drivers, does not mean it is
not applicable to non-device kernel mode programming. Many driver
developers develop drivers that have nothing to do with the hardware. You
can simplify these with the "legacy driver model" which is what is covered
in the 1990 driver books. You can do this simplification since without a
device the services of plug and play and power management do not impact
you.

You should remember that there are a lot of rules in the kernel, so things
like hitting hardware should not be done except by the device driver that
owns the device. So if you collection of data involves things like
finding the devices connected to the PCI bus, you will need to live in the
driver model and not just access the control registers.

The two best books on the current state of driver development are:

"Developing Drivers with the Windows Driver Foundation" by Orwick and
Smith

"Programming the Windows Driver Model Second Edition" by Oney

These should be on any driver developers bookshelf, and in particular for
device drivers or thing that do need to know about PnP and Power using the
WDF is the way to go.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr



> -----Original Message-----
> From: Hugo gleaves(a)hotmail.com> [mailto:hugh<underbar]
> Posted At: Saturday, March 27, 2010 8:45 PM
> Posted To: microsoft.public.development.device.drivers
> Conversation: Kernel Mode Programming
> Subject: Kernel Mode Programming
>
> I'm interested in the subject of writing code that runs in kernel mode.
> Not
> just device drivers, but general development of software or products
> that are
> able to have some parts run in kernel mode.
>
> The DDK (I assume) is all about the device driver model and how to code
> drivers that fit that model. But do MS ever expose or even discuss the
> more
> general issue of exploiting kernel mode for non-driver stuff?
>
> For example if I wanted to write a few functions that run in some kernel
> thread after system bootup, "looking" for certain things.
>
> Or coding some functions that are able to allocate bits of the non-paged
> pool
> for tracking other applications etc.
>
> It strikes me that there could be a general programming model that
> exposes
> some useful kernel stuff for non-driver purposes.
>
> Now a separate question: what is the best, up to date book on device
> driver
> coding, like Vista/W7 stuff too, lots of details etc.
>
> I have some good books but thare dated in the 1990s.
>
> Hugo
>
>
> __________ Information from ESET Smart Security, version of virus
> signature
> database 4979 (20100328) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>