[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Re: NT Drivers



At 09:13 AM 4/22/98 -0300, you wrote:
>W98 still
>uses the W95 style drivers, well at least W95 drivers all still work
>fine on my W98 machine.
The newest driver spec from ms is called the Windows Driver Model. WDM is
very similar to NT4 drivers, and is supposed to have compatability with both
'98 and NT5 without re-writing. If that really happens, remains to be seen.
Fingers crossed!

Win98 is supposed to be backward compatible with Win95 drivers, as well as
being able to use the new WDM drivers in the release version. NT5 will also
use WDM. It will probably also support NT4 drivers. Fingers crossed even more!

> and by the time we find someone to write a shell for us

A shell? I don't know what you mean by that. NT (and WDM) drivers are
layered. This means one layer for direct hardware access, and higher layers
for interfaces to user applications or other drivers. None of the driver
layers supports a user "shell" since the O/S provides user interface. Maybe
you mean something different by "shell"?

>The problem is that there are no
>commands (that I can find) in MS NT C++ for inp() and outp(), there are
>in W95. Without port access, we can't command plug-in cards.

Direct access to the hardware will cause a protection violation in NT, which
fully uses x86 Protected Mode (NOT Virtual Mode). Hardware access is
restricted to kernel-mode (ring 0)drivers. This is not a problem or bug or
flaw, but a designed in feature that helps keep poorly written programs from
bringing the system down. I don't think you would want some Visual Basic
writer to be able to put the I/O ports into a loop and lock everything up! I
know I wouldn't.

>You might want to start by waiting for NT 5.0 and Windows 98 (I think).
>Microsoft says they are going to unify the device driver model for NT
>and Windows 9x, so you only have to write one driver for both.  It
>might be too late to be thinking about starting a device driver project
>for NT 4.0.

The new WDM will be very similar to the NT4 driver model. In fact, it is
based on it. If you write an NT4 driver now, you will have little trouble
updating to WDM when it comes time. That's what most are doing, anyway,
since WDM isn't even finalized.

>>I tried reading the DDK manual, but it was over a foot high when
>>printed, and I ran out of time. I have all the tools and the device
>>driver development kit here at work, but I need to know where to start.

I'm glad I'm not paying for the toner or paper! Whew!

If you have the DDK, you should also have what every Windows programmer has,
the Windows Developers Journal magazine. The last few months have had a
series of articles written by Paula Tomlinson on NT4 kernel-mode drivers for
I/O port access. I beleive they started with the December '97 issue. This
month began the idea of layering. It seems that this is exactly what you
need. I only wish I had them when I first dived into the NT DDK to rewrite a
sound card driver a few years ago!

The name of the book is The Windows NT Device Driver Book by Art Baker. Not
bad, but you need to be pretty good with hardware to begin with. Much better
to start with the WDJ articles.

TTYL
Bill




AMSAT Top AMSAT Home