New to Drivers

David,

The 6000 WDK says: “When IRQL falls below DISPATCH_LEVEL on a
processor, the kernel dequeues the DPC object and runs the driver’s
DpcForIsr routine on that processor at IRQL DISPATCH_LEVEL.”

Correct -WDK seems to have finally fixed it. However, it is a relatively recent development - the bug that I have described had been around for more than 6 years in both W2K and XP DDKs. There is even some clarification document on the subject, admitting the fact that the official documentation is a bit “imprecise”. Can you imagine the number of complaints that, apparently, MSFT had received before this clarification document was written - apparently, they did not write it all out of blue, don’t you think???

Anton Bassov

Okay Anton, you get two brownie points, and Toby gets one :slight_smile:

Sure the scope of MS documents are larger than Toby’s document, so sure if
there is any imprecision, it is bad. But Peter is a teacher and he mentioned
the other day that lets fix the document first. That post is only couple
days old.

I found the articles, and the book fundamentally clear/concise and gives a
very very good foundations. Some of the articles are old and are being
modified ( so you can see that once a teacher always a teacher ). If
something goes against intuition, it is good to be pointed out. This is a
good thing for Toby to fix, and take a second look !!!

C’mon this is only the first month of this year. Pls move on to good stuff!

-pro

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Friday, January 11, 2008 7:05 PM
Subject: RE:[ntdev] New to Drivers

>> … imagined bugs that result from misreading what might be in the WDK
>> documentation
>> – if that’s indeed what you mean by “MSDN”.
>
> By “MSDN” I mean any official documentation that comes from MSFT.
> Ironically, WDK seems to have finally fixed the particular bug that I had
> described in my previous post. However, both W2K and XP DDKs had it.
>
> In actuality, the consequences that I have described are far from being
> imaginary. Furthermore, the term “misread” does not really apply here - it
> is not about “misunderstanding” the text. Instead, it is all about
> understanding exactly what the text says. I even remember reading some
> clarification document, saying that the documentation was a bit
> imprecise - it said that, in actuality, “DPC routine is invoked when IRQL
> is about to drop below DPC level” (which, ironically, is a bit imprecise
> as well, but at least it made it clear that DPC routine itself runs at
> DISPATCH_LEVEL). It is obvious that this clarification document was
> written in response to, apparently, numerous complaints…
>
> Probably, my argument is, indeed, a bit of a “straw man” one, but still
> you haven’t answered my question - does the official documentation, in
> your opinion, do more harm or good??? In case of the latter, why should
> its “imprecisions” be treated more leniently than the ones in Toby’s
> articles ???
>
> Anton Bassov
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

> Okay Anton, you get two brownie points, and Toby gets one :slight_smile:

Nope…

It is the other way around - Toby deserves more credit than I do. What he actually does in all his articles is just translating a documentation from “MSDN dialect” into a normal English language that can be understood by each and everyone, and does a really good job. This is why when Peter said that his work “does more harm than good”, I immediately compared it to MSDN, rather than to any other source…

Anton Bassov

David,

As I have understood NT, when a processor drops below DISPATCH_LEVEL IRQL,
a check for DPCs in the queue(s) is done. If no DPCs or anything else MS may
have added to this transition processing should run, then the scheduler runs
to decide which thread should be run. It can be the current thread that has
been running at DISPATCH_LEVEL or higher, or some other thread whose
time has come.

Disassemble HalEndSystemInterrupt(), as well as a handler of interrupt 0x41 (i.e. the one that
is responsible for DPC processing and context switches), so that you will have a chance to see how it all works…

When ISR returns, HalEndSystemInterrupt() gets invoked. First of all, HalEndSystemInterrupt()
issues EOI, and then checks whether interrupted code was originally running at elevated IRQL. If interrupted code was running at elevated IRQL, HalEndSystemInterrupt() just restores IRQL and returns. After that, EoiHelper() gets invoked - this function restores the stack and returns control to interrupted code. If a software interrupt 0x41 got requested while hardware interrupt was being processed (i.e. ISR queued a DPC), a software interrupt 0x41 will get raised when interrupted code lowers IRQL below DPC level (it will get raised by the local APIC - the OS software is completely out of play here), so that software interrupt handler will raise IRQL to DPC level and call KiDispatchInterrupt() ) that does all the things that you have mentioned above.

Otherwise, HalEndSystemInterrupt() lowers IRQL from DIRQL to DPC level , calls KiDispatchInterrupt(), and restores IRQL to the original level before returning. If context switch is needed, KiDispatchInterrupt() (or DPC routine that it invokes) does some adjustments, so that return from EoiHelper() will be made not to interrupted code but, instead, to another thread.

Anton Basov

I find that MS documents and samples sometimes have too much fat for my
taste, and that’s not good to a beginner. I may be wrong, but it looks to me
like MS sometimes tries to use a sample or a tutorial document to push their
own favorite techniques and functionality, and that overloads the reader
with things that he or she might not need to bother about at an early stage.

For example, when I first went around learning WDF - and I’m no beginner,
mind you - I quickly got irritated with the amount of peripheral fat added
to the samples. First I wanted a sample that had a DriverEntry, and
AddDevice and a board start function, and nothing else - no WMI, no C
#pragmas, maybe no KdPrints, no PAGED_CODE( ) directives, no
UNREFERENCED_PARAMETERS, no WMI, no power management: something straight to
the point, which shows me precisely what *needs* to be done to make the OS
talk to a driver, and no extra fluff. I got even more irritated when I was
trying to find out a sample that handled interrupts in a straightforward
way, and after a while I bumped into the PLX sample, which has a pretty
decent interrupt code in isrdpc.c, although you still need to extricate the
PLX unique code (guys, couldn’t you maybe put it in a
“go_handle_your_hardware( )” function ?) from the WDF mainstream code.

Introductory documentation and code isn’t the place to do any of that.
There’s time for it later, after the principles have been explained and
illustrated, and after the developer has a clue about what the framework is
all about!

The other issue was, I had to spend time figuring out what I needed to
change in my driver, and what could stay as it was. MS emphasizes a fair
amount of WDF calls which aren’t but duplications of the functionality
already existing in the OS itself. So, for example, I have a timer with a
DPC, which I implemented through the standard Ntoskrnl calls, and I had to
actually experiment to convince myself that I didn’t need to rewrite it with
WDF calls. The same thing happened with my interrupt code, at first I wanted
to leave it as is, because it sat on top of the OS API itself and I’m a
minimalist - I do not like intermediaries. However, I got a bluescreen at
device cleanup time, and the mere presence of the WDF discouraged me from
trying to figure out what was going on: I really detest debugging somebody
else’s code. That’s when I searched the samples, found the PLX driver,
extricated the interrupt code, I massaged it to my objectives, and presto, I
had a working driver in less than 10 minutes. I wish MS would have told us
the exact relationship between WDF and Ntoskrnl interrupt code ?

The very same issue happened with my PCI bus initialization code, and again,
I had to actually experiment to see what needed to be done.

The INF files is another area. I found that I could keep my existing INF
file under Vista (I barely use XP anymore), so, several written notices by
MS that “you need to have this or that in your INF file” proved to be
unnecessary in Vista. I haven’t tried XP yet, but the tone of the
documentation urged me to add those lines to the INF file (again, thanks to
the PLX driver), but it’d be nice to know whether they’re really required.
The same happened to the “sources” file, MS documentation warnings went
unheeded and so far I haven’t seen any problem.

There’s an MS “versioning” paper out in the WHDC web site that’s really
scary. It adds a string between driver and library that shouldn’t exist.
Versioning should be as simple as automatically imprinting the driver
somewhere with the DDK build number, say, 6000 or 6001, and being strict
about maintained backward compatibility. Installing a WDK should also
install those two library drivers and the coinstaller dll, so that every
driver build automatically carried those three items, and who needs explicit
KMDF versions anywhere. KISS, guys, KISS. There’s no “dll hell” on kernel
side, no need to complicate things. In fact, Microsoft, would you consider
synchronizing WDK releases with Windows releases ? And, while doing that,
guarantee backward compatibility ? So that KMDF 1.6 doesn’t break drivers
written for KMDF 1.5 ? So that WDK 60xx is usable and we don’t need to stick
to WDK 6000 because of back-compatibility issues ? That would make life much
easier on our side.

Again, the key is, I would like a set of samples that show me what actually
*needs* to be done, and that doesn’t have any functionality that doesn’t
*need* to be there. The moment you use a document or a sample as a sales
platform, we developers have a problem!

Alberto.

----- Original Message -----
From: “Prokash Sinha”
To: “Windows System Software Devs Interest List”
Sent: Friday, January 11, 2008 11:03 PM
Subject: Re: RE:[ntdev] New to Drivers

> Okay Anton, you get two brownie points, and Toby gets one :slight_smile:
>
> Sure the scope of MS documents are larger than Toby’s document, so sure if
> there is any imprecision, it is bad. But Peter is a teacher and he
> mentioned the other day that lets fix the document first. That post is
> only couple days old.
>
> I found the articles, and the book fundamentally clear/concise and gives a
> very very good foundations. Some of the articles are old and are being
> modified ( so you can see that once a teacher always a teacher ). If
> something goes against intuition, it is good to be pointed out. This is a
> good thing for Toby to fix, and take a second look !!!
>
> C’mon this is only the first month of this year. Pls move on to good
> stuff!
>
> -pro
>
> ----- Original Message -----
> From:
> To: “Windows System Software Devs Interest List”
> Sent: Friday, January 11, 2008 7:05 PM
> Subject: RE:[ntdev] New to Drivers
>
>
>>> … imagined bugs that result from misreading what might be in the WDK
>>> documentation
>>> – if that’s indeed what you mean by “MSDN”.
>>
>> By “MSDN” I mean any official documentation that comes from MSFT.
>> Ironically, WDK seems to have finally fixed the particular bug that I had
>> described in my previous post. However, both W2K and XP DDKs had it.
>>
>> In actuality, the consequences that I have described are far from being
>> imaginary. Furthermore, the term “misread” does not really apply here -
>> it is not about “misunderstanding” the text. Instead, it is all about
>> understanding exactly what the text says. I even remember reading some
>> clarification document, saying that the documentation was a bit
>> imprecise - it said that, in actuality, “DPC routine is invoked when IRQL
>> is about to drop below DPC level” (which, ironically, is a bit
>> imprecise as well, but at least it made it clear that DPC routine itself
>> runs at DISPATCH_LEVEL). It is obvious that this clarification document
>> was written in response to, apparently, numerous complaints…
>>
>> Probably, my argument is, indeed, a bit of a “straw man” one, but still
>> you haven’t answered my question - does the official documentation, in
>> your opinion, do more harm or good??? In case of the latter, why should
>> its “imprecisions” be treated more leniently than the ones in Toby’s
>> articles ???
>>
>> Anton Bassov
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Well, there is always room for improvement I guess !!!

Result:: Compare the current doc to say nt4.0 ddk doc. And few simple
samples would always help.

Context:: I’m from algorithm area, so what I learned ( and the bias went in
my head :slight_smile: ) is that when you are at a tough
decision, you have to weigh and show that there is nothing better exist
first, and then you go on to prove that it is inherently complex or
unsolvable :slight_smile:

History:: When I first saw *nix man page, I did not like it a bit. A troff
formatted tarse and terrible document for commands and some apis. And I
asked some other guys who were from Systems area, hacked University systems
for 4+ years ( and lack of better things to do at that point in life :-),
they said it is all easy, so I took some inhouse course and also found
somewhat easy ( but I heardly ever use most of the stuff in those man
pages ). – My conclusion is that anyone take a course/training would have
a higher speed than if some one just try to jump in to a new framework.

History:: When MFC/OWL came in the early 90s, people has the same ( sort of)
problem and often attacked global name space ( using :: ), though often it
was not much of a performance improvement but lack of finding the right
class and corresponding methods. In your case, it has some similarities
(timer and dpc using native API).

History:: Way too many bugs relates to calling convention, parameter passing
etc. So ASL notations or explicitly saying UNREFERENCED_PARAMETER is not
really a bad thing, sure there is an asthetic issue here, and if the
compiler guys think that they would flag as an error ( unless some
suppression is used by the developer ), it would come as a normal thing for
newbies. PAGED_CODE() etc. could be used with a comment to say it is not
necessary, but online doc search should also state the same.

For the rest of the stuff (INF, KMDF version incompatibilites etc), sure
everyone should report those. And there should be some channels to use for
reporting. These are important areas, and I think you can connect to people
at Microsoft using any such channels… For example, on the NDIS 6.0 front,
I was successful in getting lot of feedbacks, actually way lot more than I
could digest. Also we have to keep in mind that those devs/support/doc
people are busy too ( and I know that this not a way to excuse but hard
fact ), and often someone would say I can’t promise, but will escalate.
Finally, I think no one likes to debug others code, but that is
unfortunately that is the part of life for lot of people. At Microsoft,
people also find lot of hardware bugs ( and that delays projects, and cause
frustrations that I’ve seen too ).

-pro

----- Original Message -----
From: “Alberto Moreira”
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 6:33 AM
Subject: Re: RE:[ntdev] New to Drivers

>I find that MS documents and samples sometimes have too much fat for my
>taste, and that’s not good to a beginner. I may be wrong, but it looks to
>me like MS sometimes tries to use a sample or a tutorial document to push
>their own favorite techniques and functionality, and that overloads the
>reader with things that he or she might not need to bother about at an
>early stage.
>
> For example, when I first went around learning WDF - and I’m no beginner,
> mind you - I quickly got irritated with the amount of peripheral fat added
> to the samples. First I wanted a sample that had a DriverEntry, and
> AddDevice and a board start function, and nothing else - no WMI, no C
> #pragmas, maybe no KdPrints, no PAGED_CODE( ) directives, no
> UNREFERENCED_PARAMETERS, no WMI, no power management: something straight
> to the point, which shows me precisely what needs to be done to make the
> OS talk to a driver, and no extra fluff. I got even more irritated when I
> was trying to find out a sample that handled interrupts in a
> straightforward way, and after a while I bumped into the PLX sample,
> which has a pretty decent interrupt code in isrdpc.c, although you still
> need to extricate the PLX unique code (guys, couldn’t you maybe put it in
> a “go_handle_your_hardware( )” function ?) from the WDF mainstream code.
>
> Introductory documentation and code isn’t the place to do any of that.
> There’s time for it later, after the principles have been explained and
> illustrated, and after the developer has a clue about what the framework
> is all about!
>
> The other issue was, I had to spend time figuring out what I needed to
> change in my driver, and what could stay as it was. MS emphasizes a fair
> amount of WDF calls which aren’t but duplications of the functionality
> already existing in the OS itself. So, for example, I have a timer with a
> DPC, which I implemented through the standard Ntoskrnl calls, and I had to
> actually experiment to convince myself that I didn’t need to rewrite it
> with WDF calls. The same thing happened with my interrupt code, at first I
> wanted to leave it as is, because it sat on top of the OS API itself and
> I’m a minimalist - I do not like intermediaries. However, I got a
> bluescreen at device cleanup time, and the mere presence of the WDF
> discouraged me from trying to figure out what was going on: I really
> detest debugging somebody else’s code. That’s when I searched the samples,
> found the PLX driver, extricated the interrupt code, I massaged it to my
> objectives, and presto, I had a working driver in less than 10 minutes. I
> wish MS would have told us the exact relationship between WDF and Ntoskrnl
> interrupt code ?
>
> The very same issue happened with my PCI bus initialization code, and
> again, I had to actually experiment to see what needed to be done.
>
> The INF files is another area. I found that I could keep my existing INF
> file under Vista (I barely use XP anymore), so, several written notices by
> MS that “you need to have this or that in your INF file” proved to be
> unnecessary in Vista. I haven’t tried XP yet, but the tone of the
> documentation urged me to add those lines to the INF file (again, thanks
> to the PLX driver), but it’d be nice to know whether they’re really
> required. The same happened to the “sources” file, MS documentation
> warnings went unheeded and so far I haven’t seen any problem.
>
> There’s an MS “versioning” paper out in the WHDC web site that’s really
> scary. It adds a string between driver and library that shouldn’t exist.
> Versioning should be as simple as automatically imprinting the driver
> somewhere with the DDK build number, say, 6000 or 6001, and being strict
> about maintained backward compatibility. Installing a WDK should also
> install those two library drivers and the coinstaller dll, so that every
> driver build automatically carried those three items, and who needs
> explicit KMDF versions anywhere. KISS, guys, KISS. There’s no “dll hell”
> on kernel side, no need to complicate things. In fact, Microsoft, would
> you consider synchronizing WDK releases with Windows releases ? And, while
> doing that, guarantee backward compatibility ? So that KMDF 1.6 doesn’t
> break drivers written for KMDF 1.5 ? So that WDK 60xx is usable and we
> don’t need to stick to WDK 6000 because of back-compatibility issues ?
> That would make life much easier on our side.
>
> Again, the key is, I would like a set of samples that show me what
> actually needs to be done, and that doesn’t have any functionality that
> doesn’t need to be there. The moment you use a document or a sample as a
> sales platform, we developers have a problem!
>
> Alberto.
>
>
> ----- Original Message -----
> From: “Prokash Sinha”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, January 11, 2008 11:03 PM
> Subject: Re: RE:[ntdev] New to Drivers
>
>
>> Okay Anton, you get two brownie points, and Toby gets one :slight_smile:
>>
>> Sure the scope of MS documents are larger than Toby’s document, so sure
>> if there is any imprecision, it is bad. But Peter is a teacher and he
>> mentioned the other day that lets fix the document first. That post is
>> only couple days old.
>>
>> I found the articles, and the book fundamentally clear/concise and gives
>> a very very good foundations. Some of the articles are old and are being
>> modified ( so you can see that once a teacher always a teacher ). If
>> something goes against intuition, it is good to be pointed out. This is a
>> good thing for Toby to fix, and take a second look !!!
>>
>> C’mon this is only the first month of this year. Pls move on to good
>> stuff!
>>
>> -pro
>>
>> ----- Original Message -----
>> From:
>> To: “Windows System Software Devs Interest List”
>> Sent: Friday, January 11, 2008 7:05 PM
>> Subject: RE:[ntdev] New to Drivers
>>
>>
>>>> … imagined bugs that result from misreading what might be in the WDK
>>>> documentation
>>>> – if that’s indeed what you mean by “MSDN”.
>>>
>>> By “MSDN” I mean any official documentation that comes from MSFT.
>>> Ironically, WDK seems to have finally fixed the particular bug that I
>>> had described in my previous post. However, both W2K and XP DDKs had it.
>>>
>>> In actuality, the consequences that I have described are far from being
>>> imaginary. Furthermore, the term “misread” does not really apply here -
>>> it is not about “misunderstanding” the text. Instead, it is all about
>>> understanding exactly what the text says. I even remember reading some
>>> clarification document, saying that the documentation was a bit
>>> imprecise - it said that, in actuality, “DPC routine is invoked when
>>> IRQL is about to drop below DPC level” (which, ironically, is a bit
>>> imprecise as well, but at least it made it clear that DPC routine itself
>>> runs at DISPATCH_LEVEL). It is obvious that this clarification document
>>> was written in response to, apparently, numerous complaints…
>>>
>>> Probably, my argument is, indeed, a bit of a “straw man” one, but still
>>> you haven’t answered my question - does the official documentation, in
>>> your opinion, do more harm or good??? In case of the latter, why should
>>> its “imprecisions” be treated more leniently than the ones in Toby’s
>>> articles ???
>>>
>>> Anton Bassov
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

“Compare the current doc” is a bit of a problem. There are actually three
sets of “current doc”, one of which can change at any point in time.

  1. The current doc could be the doc set released with the current
    released version of the WDK (WDK 6000).
  2. The current doc could be the doc set released with the latest WDK
    (WDK 6001 some build or other).
  3. The current doc could be the docs up on MSDN which docs are neither
    (1) nor (2).

So if you do not find the answer you want in one set of docs, just check the
other two, and for the last one, wait a while and perhaps it will appear.
Plus you can annotate the MSDN docs, not that it seems like anyone actually
does.
On Jan 12, 2008 11:53 AM, Prokash Sinha wrote:

> Well, there is always room for improvement I guess !!!
> Result:: Compare the current doc to say nt4.0 ddk doc. And few simple
> samples would always help.
> SNIP
> —
> NTDEV is sponsored by OSR
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Mark Roddy

Mark,

“Compare the current doc” is a bit of a problem.
There are actually three sets of “current doc”,
one of which can change at any point in time.

The dodgy part here is that a correct information may well get replaced with incorrect one.
Please check " Thread context for PsSetCreateThreadNotifyRoutine’s callback? " thread - IIRC,
older DDK documentation was saying that a callback gets invoked in context of either a creating or a system thread. However, WDK claims that it gets invoked in context of newly-created one, which, as it has been experimentally established, is plainly false…

Anton Bassov

HUH?

While there are no guarantees in life, and I sure as hell don’t speak for Microsoft, WDK releases ARE synchornized with OS releases… and the DDKs ARE backwards compatible.

If there’s a backwards compatibility issue with getting drivers to run down-level after they’ve been built in the proper build environment of a newer DDK, then that’s a BUG and you should REPORT it.

It’s been this way for a very long time… at LEAST as far back as Win2K.

When I read stuff like this, it makes me wonder if we’re talking about the same operating system.

Peter
OSR

Peter,

I was told in this very forum to use DDK 6000 and not DDK 6001 when running
under Vista, because DDK 6001 wasn’t totally “back compatible”. Or so I
understood, hey, I may be wrong.

The point I was trying to make isn’t that I want to stick to DDK 6000 even
though DDK 60xx is good, but that however good DDK 60xx is, it should not
break a driver designed to build and run with DDK 6000.

Alberto.

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 3:20 PM
Subject: RE:[ntdev] New to Drivers

>


>
> HUH?
>
> While there are no guarantees in life, and I sure as hell don’t speak for
> Microsoft, WDK releases ARE synchornized with OS releases… and the DDKs
> ARE backwards compatible.
>
> If there’s a backwards compatibility issue with getting drivers to run
> down-level after they’ve been built in the proper build environment of a
> newer DDK, then that’s a BUG and you should REPORT it.
>
> It’s been this way for a very long time… at LEAST as far back as Win2K.
>
> When I read stuff like this, it makes me wonder if we’re talking about the
> same operating system.
>
> Peter
> OSR
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Alberto,

I find that MS documents and samples sometimes have too much fat for my taste,

Yes, but why are you ever bothered about their docs and samples??? After all, as you said a couple of days ago, you don’t even link to system-provided libraries because you avoid calling any system-provided exports in your code. Why should you be bothered about documentation of functions that you never call anyway???

Anton Bassov

The specific part that I think you are referring to is the KMDF coinstaller in earlier versions of the 6001 WDK. It could not install on downlevel systems (since fixed in the RC2 release of the WDK). That in no way reflects on the rest of the 6001 WDK.

Installing a WDK should also install those two library drivers and the coinstaller dll, so that every
driver build automatically carried those three items
I don’t see how that works, typically the machine which has the wdk installed on it is neither the target for the released driver nor the test system for said driver.

And, while doing that, guarantee backward compatibility ? So that KMDF 1.6 doesn’t break drivers
written for KMDF 1.5 ?
Umh, we already do that. A new minor release of KMDF is supposed to be (and tested to our best ability) backwards compat with all previously released minor versions of the same major version.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Alberto Moreira
Sent: Saturday, January 12, 2008 2:02 PM
To: Windows System Software Devs Interest List
Subject: Re: RE:[ntdev] New to Drivers

Peter,

I was told in this very forum to use DDK 6000 and not DDK 6001 when running
under Vista, because DDK 6001 wasn’t totally “back compatible”. Or so I
understood, hey, I may be wrong.

The point I was trying to make isn’t that I want to stick to DDK 6000 even
though DDK 60xx is good, but that however good DDK 60xx is, it should not
break a driver designed to build and run with DDK 6000.

Alberto.

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 3:20 PM
Subject: RE:[ntdev] New to Drivers

>


>
> HUH?
>
> While there are no guarantees in life, and I sure as hell don’t speak for
> Microsoft, WDK releases ARE synchornized with OS releases… and the DDKs
> ARE backwards compatible.
>
> If there’s a backwards compatibility issue with getting drivers to run
> down-level after they’ve been built in the proper build environment of a
> newer DDK, then that’s a BUG and you should REPORT it.
>
> It’s been this way for a very long time… at LEAST as far back as Win2K.
>
> When I read stuff like this, it makes me wonder if we’re talking about the
> same operating system.
>
> Peter
> OSR
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

In general production software should be built with the latest released WDK
(or earlier) not with beta level WDK releases. In fact the beta releases
usually come with some sort of license restriction to that effect. This is
sort of fundamental software configuration management stuff. Why would
anyone inflict beta toolkits on their production software?

On Jan 12, 2008 5:49 PM, Doron Holan wrote:

> The specific part that I think you are referring to is the KMDF
> coinstaller in earlier versions of the 6001 WDK. It could not install on
> downlevel systems (since fixed in the RC2 release of the WDK). That in no
> way reflects on the rest of the 6001 WDK.
>
> > Installing a WDK should also install those two library drivers and the
> coinstaller dll, so that every
> > driver build automatically carried those three items
> I don’t see how that works, typically the machine which has the wdk
> installed on it is neither the target for the released driver nor the test
> system for said driver.
>
> > And, while doing that, guarantee backward compatibility ? So that KMDF
> 1.6 doesn’t break drivers
> > written for KMDF 1.5 ?
> Umh, we already do that. A new minor release of KMDF is supposed to be
> (and tested to our best ability) backwards compat with all previously
> released minor versions of the same major version.
>
> d
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Alberto Moreira
> Sent: Saturday, January 12, 2008 2:02 PM
> To: Windows System Software Devs Interest List
> Subject: Re: RE:[ntdev] New to Drivers
>
> Peter,
>
> I was told in this very forum to use DDK 6000 and not DDK 6001 when
> running
> under Vista, because DDK 6001 wasn’t totally “back compatible”. Or so I
> understood, hey, I may be wrong.
>
> The point I was trying to make isn’t that I want to stick to DDK 6000 even
> though DDK 60xx is good, but that however good DDK 60xx is, it should not
> break a driver designed to build and run with DDK 6000.
>
> Alberto.
>
>
> ----- Original Message -----
> From:
> To: “Windows System Software Devs Interest List”
> Sent: Saturday, January 12, 2008 3:20 PM
> Subject: RE:[ntdev] New to Drivers
>
>
> >


> >
> > HUH?
> >
> > While there are no guarantees in life, and I sure as hell don’t speak
> for
> > Microsoft, WDK releases ARE synchornized with OS releases… and the
> DDKs
> > ARE backwards compatible.
> >
> > If there’s a backwards compatibility issue with getting drivers to run
> > down-level after they’ve been built in the proper build environment of a
> > newer DDK, then that’s a BUG and you should REPORT it.
> >
> > It’s been this way for a very long time… at LEAST as far back as
> Win2K.
> >
> > When I read stuff like this, it makes me wonder if we’re talking about
> the
> > same operating system.
> >
> > Peter
> > OSR
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

Doron has a small typo in his earlier email. Indeed the WDF coinstallers had some problems installing in some OS versions, however they were fixed in the RC1 version of the latest WDK (for Windows Server 2008), as is noted as http://blogs.msdn.com/iliast/archive/2007/12/13/wdf-1-7-rc1-has-been-released.aspx.

Ilias


From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] On Behalf Of Mark Roddy [xxxxx@hollistech.com]
Sent: Saturday, January 12, 2008 4:30 PM
To: Windows System Software Devs Interest List
Subject: Re: RE:[ntdev] New to Drivers

In general production software should be built with the latest released WDK (or earlier) not with beta level WDK releases. In fact the beta releases usually come with some sort of license restriction to that effect. This is sort of fundamental software configuration management stuff. Why would anyone inflict beta toolkits on their production software?

On Jan 12, 2008 5:49 PM, Doron Holan > wrote:
The specific part that I think you are referring to is the KMDF coinstaller in earlier versions of the 6001 WDK. It could not install on downlevel systems (since fixed in the RC2 release of the WDK). That in no way reflects on the rest of the 6001 WDK.

> Installing a WDK should also install those two library drivers and the coinstaller dll, so that every
> driver build automatically carried those three items
I don’t see how that works, typically the machine which has the wdk installed on it is neither the target for the released driver nor the test system for said driver.

> And, while doing that, guarantee backward compatibility ? So that KMDF 1.6 doesn’t break drivers
> written for KMDF 1.5 ?
Umh, we already do that. A new minor release of KMDF is supposed to be (and tested to our best ability) backwards compat with all previously released minor versions of the same major version.

d

-----Original Message-----
From: xxxxx@lists.osr.commailto:xxxxx [mailto:xxxxx@lists.osr.com mailto:xxxxx] On Behalf Of Alberto Moreira
Sent: Saturday, January 12, 2008 2:02 PM
To: Windows System Software Devs Interest List
Subject: Re: RE:[ntdev] New to Drivers

Peter,

I was told in this very forum to use DDK 6000 and not DDK 6001 when running
under Vista, because DDK 6001 wasn’t totally “back compatible”. Or so I
understood, hey, I may be wrong.

The point I was trying to make isn’t that I want to stick to DDK 6000 even
though DDK 60xx is good, but that however good DDK 60xx is, it should not
break a driver designed to build and run with DDK 6000.

Alberto.

----- Original Message -----
From: >
To: “Windows System Software Devs Interest List” < xxxxx@lists.osr.commailto:xxxxx>
Sent: Saturday, January 12, 2008 3:20 PM
Subject: RE:[ntdev] New to Drivers

>


>
> HUH?
>
> While there are no guarantees in life, and I sure as hell don’t speak for
> Microsoft, WDK releases ARE synchornized with OS releases… and the DDKs
> ARE backwards compatible.
>
> If there’s a backwards compatibility issue with getting drivers to run
> down-level after they’ve been built in the proper build environment of a
> newer DDK, then that’s a BUG and you should REPORT it.
>
> It’s been this way for a very long time… at LEAST as far back as Win2K.
>
> When I read stuff like this, it makes me wonder if we’re talking about the
> same operating system.
>
> Peter
> OSR
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Mark Roddy — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Several years ago I was the contact for a sponsored research project at
Seattle U on taking an audio driver (AC97 woo!) and add remote capabilities.
Now, without going into the details of that since its unrelated to this
post, the undergrads working on the project did not have driver experience.
They were confused by MSDN. I pointed them to every document from IRPs to
IRQLs that needed to be read along with descriptions for the APIs, etc. I
told them about what books to buy and other articles online (which, like
mine, have mistakes) but in the end they were just confused. I worked with
them for several months and eventually I had the idea that since there
aren’t any tutorials on the net that “dumbed” down driver technology for
noobs, why not make some? That’s how the articles got started and that’s
why the first 5 went up to a basic TDI client driver.

The articles purposely only start discussions with legacy non-PNP as a base
and had I continued the series (I currently cannot write articles due to the
sensitivity of my current employment role) they would have eventually
included PNP and eventually KMDF, etc. etc. but only as introductory.
Basically, once you’re not a noob, MSDN starts to make more sense and that’s
fine. MSDN isn’t a tutorial it’s a technical documentation of if you want
XYZ, here’s XYZ and a brief description maybe example. You’re not a noob,
probably pick it right up with some fooling around. There are technical
articles on topics, but for the most part are more geared towards seasoned
professionals and don’t start from how to crawl but assume you can already
jog.

I agree with the statements about my use of terminology. I am very lax and
always have been and I still refer to things in my own way a lot of the
time. I believe in concepts more than terminology (besides, a lot of
terminology and acronyms are over used and mean something different
depending on what your context is). Terminology is a necessary evil to
understanding technical documentation but I believe learning what they mean
in layman terms first is most beneficial and then you can call it whatever
you want. You can call it La Ventana I’ll call it Window, you call it
comida, I’ll call it food just as long as we’re on the same page. I have
run into a lot of people who know all the terminology and the definitions
even to a T. However when probing them they don’t understand the concepts
behind them and can’t relate to them under any other umbrella. I like to
say these people are “book smart”. This is the opposite danger of teaching
someone terminology if they only go as far as tying it to the definition and
not understanding the concepts behind it. They may not be able to relate to
them to under similar implementations.

The articles that I have written could use an update most definitely. In
fact there are several typos and issues I would love to correct and
sometimes I have just added stuff in the comments or submitted a bug. The
big problem is that with the article site “Code Project” once their editors
update an article, they lock it so you can’t modify it and apparently
submitting requests for changes are ignored. This is definitely an item
that could be brought up to the management of code project that articles
perhaps should be living documents rather than remain stagnant as sometimes
updates are required.

Someone had mentioned that there is a danger of reading the articles then
think they know driver programming. That’s true and true of any article.
This is for some reason this is very popular in engineering. Engineers seem
to want to skip the “years of learning and experience” and replace it with
an hour of reading. This practice is also more popular in noobs who lack
the experience to realize this and they are the ones who actually need it
more.

I don’t think that there is a real “wrong” or “right” way to teach since
everyone learns differently. There are those who learn visually, those who
learn by doing and those who learn by osmosis. A lot of times I like to
just try and relate things in terms that the audience should already
understand. I may relate to a topic in terms of an airplane to a pilot but
definitely not to a race car driver. I believe most of you probably do the
same thing or maybe have your own methods and that’s fine too.

There are a lot of people bash the “C in 24 hours” or “C in 21 days” for
similar reasons but these are really just C in 24 lessons books (and I’ve
heard others defend them using the same verbiage). The intention of those
books isn’t to provide the illusion that reading these books means you’re an
expert. They are dumbed down (I realize this is bad terminology to use as
it seems degrading, no?) so that someone without a programming background
can pick it up and at the end write a very basic program. They are geared
for a particular audience and perhaps not as useful for someone with
experience in programming Ada or Pascal. Those individuals would benefit
from a more advanced introductory book of C but these same books assume too
much background and would be confusing to a complete noob. Related to the
previous topic though, it’s quite possible for a noob to read “C in 24
hours” then think they are Senior Fellow at Microsoft, so are they
dangerous? The only thing that can remove the dangers of being a noob is
years of experience and professional guidance along the way so it is a
continuing battle.

I was a DOS programmer before I went into Windows. The most famous book
everyone mentions for noobs is “Programming Windows 95” (or some newer
version) by Charles Petzold. I bought this book and the first chapter was
something along the lines of 100 pages. After reading those 100 pages I was
able to copy the very long example and execute it and then be like wow, I
still don’t understand this stuff. The book I actually learned Windows
programming on was probably a book most people would think is the crappiest
book to buy. “The Black Art of Windows Game Programming” (No, this wasn’t a
LaMothe book, probably a step down from that even since it was WinG). The
first 5 chapters were very short and simple (probably totaled less than 100
pages and had big letters and pictures!). The book explained Windows
programming in a language that a DOS programmer could understand. It
related concepts of how Windows GUI event driven programming works in the
context of DOS. I was able to write a space invaders clone in 2 days after
reading just those 5 chapters. Sure it was crappy source code, I was still
a noob to Windows GUI and it would take years of experience to improve but
it was a start. I was able to read MSDN after that.

I thank Anton for your support of my articles. I do welcome any criticism
as without it you cannot improve yourself. Sorry for the soap box, but I
thought I would contribute.

Thanks,

Toby

If I build a driver with WDK 6001, for example, and I need some components
from that WDK at run time, I would expect that those components were added
somehow to the driver executable or to whatever structure gets loaded,
unless of course they’re already at the target, for example, as a part of
the OS. Given that Windbg is able to load a driver remotely from host to
target, that should also apply to the host. I guess my point is, whatever’s
needed by a driver should be packaged in by the WDK or else be present in
the target.

And uh, I had to go back to 6000 because 6001 didn’t produce good
Vista-compatible drivers.

Alberto.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 5:49 PM
Subject: RE: RE:[ntdev] New to Drivers

The specific part that I think you are referring to is the KMDF coinstaller
in earlier versions of the 6001 WDK. It could not install on downlevel
systems (since fixed in the RC2 release of the WDK). That in no way
reflects on the rest of the 6001 WDK.

> Installing a WDK should also install those two library drivers and the
> coinstaller dll, so that every
> driver build automatically carried those three items
I don’t see how that works, typically the machine which has the wdk
installed on it is neither the target for the released driver nor the test
system for said driver.

> And, while doing that, guarantee backward compatibility ? So that KMDF 1.6
> doesn’t break drivers
> written for KMDF 1.5 ?
Umh, we already do that. A new minor release of KMDF is supposed to be (and
tested to our best ability) backwards compat with all previously released
minor versions of the same major version.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alberto Moreira
Sent: Saturday, January 12, 2008 2:02 PM
To: Windows System Software Devs Interest List
Subject: Re: RE:[ntdev] New to Drivers

Peter,

I was told in this very forum to use DDK 6000 and not DDK 6001 when running
under Vista, because DDK 6001 wasn’t totally “back compatible”. Or so I
understood, hey, I may be wrong.

The point I was trying to make isn’t that I want to stick to DDK 6000 even
though DDK 60xx is good, but that however good DDK 60xx is, it should not
break a driver designed to build and run with DDK 6000.

Alberto.

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 3:20 PM
Subject: RE:[ntdev] New to Drivers

>


>
> HUH?
>
> While there are no guarantees in life, and I sure as hell don’t speak for
> Microsoft, WDK releases ARE synchornized with OS releases… and the DDKs
> ARE backwards compatible.
>
> If there’s a backwards compatibility issue with getting drivers to run
> down-level after they’ve been built in the proper build environment of a
> newer DDK, then that’s a BUG and you should REPORT it.
>
> It’s been this way for a very long time… at LEAST as far back as Win2K.
>
> When I read stuff like this, it makes me wonder if we’re talking about the
> same operating system.
>
> Peter
> OSR
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I am a minimalist, but not a nihilist.

The problem is that there’s a minimum layer that I need to use. Things that
are dictated by the OS-Driver API. DriverEntry, create a device, manage a
PCI bus config, move data between user and kernel space, register an
interrupt with the OS, and so on. That’s already a fair amount of detail
that needs to be documented!

On the other hand, if I find that an API is superfluous, or that it gets on
my way, or that it’ll take me less time to roll my own than to learn its
ropes, or that it moves me away from compatibility with non-Windows OS’s, or
that it forces somebody else’s design on me, then I feel I’m free to refuse
to use it.

To me, an OS should be like the genie in the lamp. If and when I decide to
rub it, the genie comes out, “Your wish is my command!”, and then, after it
does what I want, it disappears from my sight, back into the lamp.

In my mind at least, Occam’s Razor rules supreme!

Alberto.

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 5:01 PM
Subject: RE:[ntdev] New to Drivers

> Alberto,
>
>> I find that MS documents and samples sometimes have too much fat for my
>> taste,
>
> Yes, but why are you ever bothered about their docs and samples??? After
> all, as you said a couple of days ago, you don’t even link to
> system-provided libraries because you avoid calling any system-provided
> exports in your code. Why should you be bothered about documentation of
> functions that you never call anyway???
>
> Anton Bassov
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

> The problem is that there’s a minimum layer that I need to use.

Things that are dictated by the OS-Driver API. DriverEntry, create a device,
manage a PCI bus config, move data between user and kernel space,
register an interrupt with the OS, and so on.

Why do you avoid linking to ntoskrnl.lib then??? Is not it easier to specify it in your "Sources’, along with headers and input C files, and build everything by WDK??? What are you expecting
to win when going for various convoluted building “solutions”??? I do agree that sometimes
one may want to go for something “not-so-conventional” when it comes to writing the actual *code*, but I just refuse to understand someone who extends the same approach to build process - a lot of pain but nothing to gain…

Anton Bassov

The weird comments on your articles have really amazed me. One typically
does not build up development skills by learning the right terminology,
taking courses or going through long boring lectures about design and layers
of operating system components such as the I/O manager, memory manager,
cache manager and the like without getting an idea what that would mean in
the real world. Even if you are academically shaped and have a good memory,
you are likely to forget all of this without bringing this knowledge into
practice.

What is most important to develop good drivers is not knowledge but skills.
Skills are higher than knowledge. Having good skills means that you are able
to find and obtain the right knowledge for doing your job right when
required.

When starting out with Windows drivers, there is just way too much stuff to
learn. The best way according to me is to start with a hands on example of a
simple but complete driver with some basic functionality together with an
application. That doesn’t mean that you are being flattered but it means you
have a solid starting point from which you can grow and expand your skills
and knowledge and it looks like your article just does that. It may mean
that in the beginning you do not know exactly what you are doing. It should
go without saying that one should be intelligent enough to realize he
doesn’t have enough knowledge for building production grade drivers just
because he manages to change an existing sample, compile it and see it work.

I have never followed any type of computer course in all my life. I have
been expelled from college (doing maths) for not attending lectures and it
has never caused any regret.

/Daniel

“Toby Opferman” wrote in message news:xxxxx@ntdev…
> Several years ago I was the contact for a sponsored research project at
> Seattle U on taking an audio driver (AC97 woo!) and add remote
> capabilities.
> Now, without going into the details of that since its unrelated to this
> post, the undergrads working on the project did not have driver
> experience.
> They were confused by MSDN. I pointed them to every document from IRPs to
> IRQLs that needed to be read along with descriptions for the APIs, etc. I
> told them about what books to buy and other articles online (which, like
> mine, have mistakes) but in the end they were just confused. I worked
> with
> them for several months and eventually I had the idea that since there
> aren’t any tutorials on the net that “dumbed” down driver technology for
> noobs, why not make some? That’s how the articles got started and that’s
> why the first 5 went up to a basic TDI client driver.
>
> The articles purposely only start discussions with legacy non-PNP as a
> base
> and had I continued the series (I currently cannot write articles due to
> the
> sensitivity of my current employment role) they would have eventually
> included PNP and eventually KMDF, etc. etc. but only as introductory.
> Basically, once you’re not a noob, MSDN starts to make more sense and
> that’s
> fine. MSDN isn’t a tutorial it’s a technical documentation of if you want
> XYZ, here’s XYZ and a brief description maybe example. You’re not a noob,
> probably pick it right up with some fooling around. There are technical
> articles on topics, but for the most part are more geared towards seasoned
> professionals and don’t start from how to crawl but assume you can already
> jog.
>
> I agree with the statements about my use of terminology. I am very lax
> and
> always have been and I still refer to things in my own way a lot of the
> time. I believe in concepts more than terminology (besides, a lot of
> terminology and acronyms are over used and mean something different
> depending on what your context is). Terminology is a necessary evil to
> understanding technical documentation but I believe learning what they
> mean
> in layman terms first is most beneficial and then you can call it whatever
> you want. You can call it La Ventana I’ll call it Window, you call it
> comida, I’ll call it food just as long as we’re on the same page. I have
> run into a lot of people who know all the terminology and the definitions
> even to a T. However when probing them they don’t understand the concepts
> behind them and can’t relate to them under any other umbrella. I like to
> say these people are “book smart”. This is the opposite danger of
> teaching
> someone terminology if they only go as far as tying it to the definition
> and
> not understanding the concepts behind it. They may not be able to relate
> to
> them to under similar implementations.
>
> The articles that I have written could use an update most definitely. In
> fact there are several typos and issues I would love to correct and
> sometimes I have just added stuff in the comments or submitted a bug. The
> big problem is that with the article site “Code Project” once their
> editors
> update an article, they lock it so you can’t modify it and apparently
> submitting requests for changes are ignored. This is definitely an item
> that could be brought up to the management of code project that articles
> perhaps should be living documents rather than remain stagnant as
> sometimes
> updates are required.
>
> Someone had mentioned that there is a danger of reading the articles then
> think they know driver programming. That’s true and true of any article.
> This is for some reason this is very popular in engineering. Engineers
> seem
> to want to skip the “years of learning and experience” and replace it with
> an hour of reading. This practice is also more popular in noobs who lack
> the experience to realize this and they are the ones who actually need it
> more.
>
> I don’t think that there is a real “wrong” or “right” way to teach since
> everyone learns differently. There are those who learn visually, those
> who
> learn by doing and those who learn by osmosis. A lot of times I like to
> just try and relate things in terms that the audience should already
> understand. I may relate to a topic in terms of an airplane to a pilot
> but
> definitely not to a race car driver. I believe most of you probably do
> the
> same thing or maybe have your own methods and that’s fine too.
>
> There are a lot of people bash the “C in 24 hours” or “C in 21 days” for
> similar reasons but these are really just C in 24 lessons books (and I’ve
> heard others defend them using the same verbiage). The intention of those
> books isn’t to provide the illusion that reading these books means you’re
> an
> expert. They are dumbed down (I realize this is bad terminology to use as
> it seems degrading, no?) so that someone without a programming background
> can pick it up and at the end write a very basic program. They are geared
> for a particular audience and perhaps not as useful for someone with
> experience in programming Ada or Pascal. Those individuals would benefit
> from a more advanced introductory book of C but these same books assume
> too
> much background and would be confusing to a complete noob. Related to the
> previous topic though, it’s quite possible for a noob to read “C in 24
> hours” then think they are Senior Fellow at Microsoft, so are they
> dangerous? The only thing that can remove the dangers of being a noob is
> years of experience and professional guidance along the way so it is a
> continuing battle.
>
> I was a DOS programmer before I went into Windows. The most famous book
> everyone mentions for noobs is “Programming Windows 95” (or some newer
> version) by Charles Petzold. I bought this book and the first chapter was
> something along the lines of 100 pages. After reading those 100 pages I
> was
> able to copy the very long example and execute it and then be like wow, I
> still don’t understand this stuff. The book I actually learned Windows
> programming on was probably a book most people would think is the
> crappiest
> book to buy. “The Black Art of Windows Game Programming” (No, this wasn’t
> a
> LaMothe book, probably a step down from that even since it was WinG). The
> first 5 chapters were very short and simple (probably totaled less than
> 100
> pages and had big letters and pictures!). The book explained Windows
> programming in a language that a DOS programmer could understand. It
> related concepts of how Windows GUI event driven programming works in the
> context of DOS. I was able to write a space invaders clone in 2 days
> after
> reading just those 5 chapters. Sure it was crappy source code, I was
> still
> a noob to Windows GUI and it would take years of experience to improve but
> it was a start. I was able to read MSDN after that.
>
> I thank Anton for your support of my articles. I do welcome any criticism
> as without it you cannot improve yourself. Sorry for the soap box, but I
> thought I would contribute.
>
> Thanks,
>
> Toby
>
>
>
>
>
>
>
>
>
>
>
>
>
>

I would like to chime in here and say thank you for your articles. Although
there are some errors, they were indeed succinct and helped me to understand
many of the basic concepts of driver development without having to read
several
hundred pages of some ‘fluff’ filed book. Stumbling is better than crawling.

In the future, given the opportunity arises, I hope you would create more
articles.
You indeed have a talent for delivering a great deal of content in few words
(and
have it actually make sense).

Thank You,

Matt

----- Original Message -----
From: “Toby Opferman”
To: “Windows System Software Devs Interest List”
Sent: Saturday, January 12, 2008 7:07 PM
Subject: RE: RE:[ntdev] New to Drivers

> Several years ago I was the contact for a sponsored research project at
> Seattle U on taking an audio driver (AC97 woo!) and add remote
> capabilities.
> Now, without going into the details of that since its unrelated to this
> post, the undergrads working on the project did not have driver
> experience.
> They were confused by MSDN. I pointed them to every document from IRPs to
> IRQLs that needed to be read along with descriptions for the APIs, etc. I
> told them about what books to buy and other articles online (which, like
> mine, have mistakes) but in the end they were just confused. I worked
> with
> them for several months and eventually I had the idea that since there
> aren’t any tutorials on the net that “dumbed” down driver technology for
> noobs, why not make some? That’s how the articles got started and that’s
> why the first 5 went up to a basic TDI client driver.
>
> The articles purposely only start discussions with legacy non-PNP as a
> base
> and had I continued the series (I currently cannot write articles due to
> the
> sensitivity of my current employment role) they would have eventually
> included PNP and eventually KMDF, etc. etc. but only as introductory.
> Basically, once you’re not a noob, MSDN starts to make more sense and
> that’s
> fine. MSDN isn’t a tutorial it’s a technical documentation of if you want
> XYZ, here’s XYZ and a brief description maybe example. You’re not a noob,
> probably pick it right up with some fooling around. There are technical
> articles on topics, but for the most part are more geared towards seasoned
> professionals and don’t start from how to crawl but assume you can already
> jog.
>
> I agree with the statements about my use of terminology. I am very lax
> and
> always have been and I still refer to things in my own way a lot of the
> time. I believe in concepts more than terminology (besides, a lot of
> terminology and acronyms are over used and mean something different
> depending on what your context is). Terminology is a necessary evil to
> understanding technical documentation but I believe learning what they
> mean
> in layman terms first is most beneficial and then you can call it whatever
> you want. You can call it La Ventana I’ll call it Window, you call it
> comida, I’ll call it food just as long as we’re on the same page. I have
> run into a lot of people who know all the terminology and the definitions
> even to a T. However when probing them they don’t understand the concepts
> behind them and can’t relate to them under any other umbrella. I like to
> say these people are “book smart”. This is the opposite danger of
> teaching
> someone terminology if they only go as far as tying it to the definition
> and
> not understanding the concepts behind it. They may not be able to relate
> to
> them to under similar implementations.
>
> The articles that I have written could use an update most definitely. In
> fact there are several typos and issues I would love to correct and
> sometimes I have just added stuff in the comments or submitted a bug. The
> big problem is that with the article site “Code Project” once their
> editors
> update an article, they lock it so you can’t modify it and apparently
> submitting requests for changes are ignored. This is definitely an item
> that could be brought up to the management of code project that articles
> perhaps should be living documents rather than remain stagnant as
> sometimes
> updates are required.
>
> Someone had mentioned that there is a danger of reading the articles then
> think they know driver programming. That’s true and true of any article.
> This is for some reason this is very popular in engineering. Engineers
> seem
> to want to skip the “years of learning and experience” and replace it with
> an hour of reading. This practice is also more popular in noobs who lack
> the experience to realize this and they are the ones who actually need it
> more.
>
> I don’t think that there is a real “wrong” or “right” way to teach since
> everyone learns differently. There are those who learn visually, those
> who
> learn by doing and those who learn by osmosis. A lot of times I like to
> just try and relate things in terms that the audience should already
> understand. I may relate to a topic in terms of an airplane to a pilot
> but
> definitely not to a race car driver. I believe most of you probably do
> the
> same thing or maybe have your own methods and that’s fine too.
>
> There are a lot of people bash the “C in 24 hours” or “C in 21 days” for
> similar reasons but these are really just C in 24 lessons books (and I’ve
> heard others defend them using the same verbiage). The intention of those
> books isn’t to provide the illusion that reading these books means you’re
> an
> expert. They are dumbed down (I realize this is bad terminology to use as
> it seems degrading, no?) so that someone without a programming background
> can pick it up and at the end write a very basic program. They are geared
> for a particular audience and perhaps not as useful for someone with
> experience in programming Ada or Pascal. Those individuals would benefit
> from a more advanced introductory book of C but these same books assume
> too
> much background and would be confusing to a complete noob. Related to the
> previous topic though, it’s quite possible for a noob to read “C in 24
> hours” then think they are Senior Fellow at Microsoft, so are they
> dangerous? The only thing that can remove the dangers of being a noob is
> years of experience and professional guidance along the way so it is a
> continuing battle.
>
> I was a DOS programmer before I went into Windows. The most famous book
> everyone mentions for noobs is “Programming Windows 95” (or some newer
> version) by Charles Petzold. I bought this book and the first chapter was
> something along the lines of 100 pages. After reading those 100 pages I
> was
> able to copy the very long example and execute it and then be like wow, I
> still don’t understand this stuff. The book I actually learned Windows
> programming on was probably a book most people would think is the
> crappiest
> book to buy. “The Black Art of Windows Game Programming” (No, this wasn’t
> a
> LaMothe book, probably a step down from that even since it was WinG). The
> first 5 chapters were very short and simple (probably totaled less than
> 100
> pages and had big letters and pictures!). The book explained Windows
> programming in a language that a DOS programmer could understand. It
> related concepts of how Windows GUI event driven programming works in the
> context of DOS. I was able to write a space invaders clone in 2 days
> after
> reading just those 5 chapters. Sure it was crappy source code, I was
> still
> a noob to Windows GUI and it would take years of experience to improve but
> it was a start. I was able to read MSDN after that.
>
> I thank Anton for your support of my articles. I do welcome any criticism
> as without it you cannot improve yourself. Sorry for the soap box, but I
> thought I would contribute.
>
> Thanks,
>
> Toby
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>