need advice learning driver development..

Hi,
I am trying to learn writing windows device drivers. I tried reading
Oney book, but kinda found it complex for beginner like me.
I recently more or less completed reading windows 2000 device driver by
Art baker and I am slightly comfortable with windbg.
I need to know if I need to understand wdm model more throughly thru
Oney book before jumping to developing wdf drivers (using book
Developing Drivers with the Microsoft Windows Driver Foundation)? or,
should I start reading Orwick’s book with samples in it?
My target is to learn NDIS 6.2 (must).

So from my current situation, how should i proceed? Any help/suggestion
would be helpful.

[Please note, I cannot afford seminar and I am recent graduate with good
OS concepts in general but not windows in specific, which I want to learn]

Where do you stand with the WDK? Do you have the latest? If not get it!!!
Personally, I would start with the network and KMDF examples in the WDK,
using the text books for reference as I worked through those applicable to
the task.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Piyush Jain
Sent: Wednesday, July 07, 2010 7:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] need advice learning driver development…

Hi,
I am trying to learn writing windows device drivers. I tried reading Oney
book, but kinda found it complex for beginner like me.
I recently more or less completed reading windows 2000 device driver by Art
baker and I am slightly comfortable with windbg.
I need to know if I need to understand wdm model more throughly thru Oney
book before jumping to developing wdf drivers (using book Developing Drivers
with the Microsoft Windows Driver Foundation)? or, should I start reading
Orwick’s book with samples in it?
My target is to learn NDIS 6.2 (must).

So from my current situation, how should i proceed? Any help/suggestion
would be helpful.

[Please note, I cannot afford seminar and I am recent graduate with good OS
concepts in general but not windows in specific, which I want to learn]


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 have wdk 7.1, the latest !
As per you, I should start looking into examples and wdf book directly,
right?
I, mainly need to learn about ndis and wdf model.

On 07-07-2010 18:29, Gary G. Little wrote:

Where do you stand with the WDK? Do you have the latest? If not get it!!!
Personally, I would start with the network and KMDF examples in the WDK,
using the text books for reference as I worked through those applicable to
the task.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Piyush Jain
Sent: Wednesday, July 07, 2010 7:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] need advice learning driver development…

Hi,
I am trying to learn writing windows device drivers. I tried reading Oney
book, but kinda found it complex for beginner like me.
I recently more or less completed reading windows 2000 device driver by Art
baker and I am slightly comfortable with windbg.
I need to know if I need to understand wdm model more throughly thru Oney
book before jumping to developing wdf drivers (using book Developing Drivers
with the Microsoft Windows Driver Foundation)? or, should I start reading
Orwick’s book with samples in it?
My target is to learn NDIS 6.2 (must).

So from my current situation, how should i proceed? Any help/suggestion
would be helpful.

[Please note, I cannot afford seminar and I am recent graduate with good OS
concepts in general but not windows in specific, which I want to learn]


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

Then I would build the KMDF network examples and install them. Setup the
target and host machines, install WinDbg, which should have installed with
the WDK, set the target up for debug, build your target examples, and start
stepping into code. That’s how I would dot, but then I tend to be more
hands-on.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Piyush Jain
Sent: Wednesday, July 07, 2010 8:25 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] need advice learning driver development…

I have wdk 7.1, the latest !
As per you, I should start looking into examples and wdf book directly,
right?
I, mainly need to learn about ndis and wdf model.

On 07-07-2010 18:29, Gary G. Little wrote:

Where do you stand with the WDK? Do you have the latest? If not get it!!!
Personally, I would start with the network and KMDF examples in the
WDK, using the text books for reference as I worked through those
applicable to the task.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Piyush Jain
Sent: Wednesday, July 07, 2010 7:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] need advice learning driver development…

Hi,
I am trying to learn writing windows device drivers. I tried reading
Oney book, but kinda found it complex for beginner like me.
I recently more or less completed reading windows 2000 device driver
by Art baker and I am slightly comfortable with windbg.
I need to know if I need to understand wdm model more throughly thru
Oney book before jumping to developing wdf drivers (using book
Developing Drivers with the Microsoft Windows Driver Foundation)? or,
should I start reading Orwick’s book with samples in it?
My target is to learn NDIS 6.2 (must).

So from my current situation, how should i proceed? Any
help/suggestion would be helpful.

[Please note, I cannot afford seminar and I am recent graduate with
good OS concepts in general but not windows in specific, which I want
to learn]


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

@OP:

NDIS is its own special world. Don’t bother too much with WDM and such.

Learn the basics of the OS and I/O Subsystem architecture. Read the Russinovich and Solomon internals book. Look on OSR Online and www.microsoft.com/whdc for articles on basic I/O architecture (both are an admitted MESS in terms of trying to find anything… just plow through and read some stuff that looks interesting).

Once this is accomplished – and I mean spend a few days not a few weeks – dive directly into the examples. Look at NDIS examples that are SPECIFICALLY THE TYPE OF DRIVER YOU WANT TO WRITE. NDIS is a vast pile of different models and specifications… with many different interfaces, depending on what you want to accomplish (are you writing a protocol, a filter, a driver for a WAN device, a driver for a NIC). So, stick to the type of driver you’ll be working on to save yourself a ton of time and confusion.

At the same time, try to read through Orwick book about WDF. Yes, it’s confusing and sorta vague. But, it’s what we’ve got. To amuse yourself a bit, work through a couple of their kernel-mode examples. Ignore the user-mode UMDF stuff they talk about. If you want to get a good handle on KMDF principles, try writing a simple filter driver – I suggest a filter for a NON CRITICAL DEVICE like a CDROM drive – Make you filter do something obvious, but sort of useful, like block all reads that are sent to the device (perhaps this blocking is enabled/disabled by an IOCTL that a test app you write sends to the filter). Starting from scratch, after having absorb the architectural stuff and reading the Orwick book, it’ll probably take you most of a week to write this filter. When you’re done, you’ll know a lot, including the basics of KMDF and how to use WinDbg. This is all key.

How’s that for a learning plan?

Peter
OSR

> I need to know if I need to understand wdm model more throughly thru

Oney book before jumping to developing wdf drivers (using book
Developing Drivers with the Microsoft Windows Driver Foundation)? or,
should I start reading Orwick’s book with samples in it?
My target is to learn NDIS 6.2 (must).

NDIS is not covered in either book, I think there is no NDIS books.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thanks Gary, Maxim and Peter for your advice. I really really appreciate it.

On Thu, Jul 8, 2010 at 12:25 AM, Maxim S. Shatskih
wrote:

> > I need to know if I need to understand wdm model more throughly thru
> > Oney book before jumping to developing wdf drivers (using book
> > Developing Drivers with the Microsoft Windows Driver Foundation)? or,
> > should I start reading Orwick’s book with samples in it?
> > My target is to learn NDIS 6.2 (must).
>
> NDIS is not covered in either book, I think there is no NDIS books.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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
>

There’s a saying that if one wants some milk, he don’t have to keep a large
animal
(or herd or smaller animals).
Learning Windows drivers is not easy, and the skills you’d acquire won’t buy
you much in future.
If all you need is just one driver, get somebody else to make it.
You can invest the time and effort in better ways.

Regards,
– pa

“Piyush Jain” wrote in message news:xxxxx@ntdev…
> Hi,
> I am trying to learn writing windows device drivers. I tried reading Oney
> book, but kinda found it complex for beginner like me.
> I recently more or less completed reading windows 2000 device driver by
> Art baker and I am slightly comfortable with windbg.
> I need to know if I need to understand wdm model more throughly thru Oney
> book before jumping to developing wdf drivers (using book Developing
> Drivers with the Microsoft Windows Driver Foundation)? or, should I start
> reading Orwick’s book with samples in it?
> My target is to learn NDIS 6.2 (must).
>
> So from my current situation, how should i proceed? Any help/suggestion
> would be helpful.
>
> [Please note, I cannot afford seminar and I am recent graduate with good
> OS concepts in general but not windows in specific, which I want to learn]

(i don’t need a driver, my job requires me to learn it)

On Fri, Jul 9, 2010 at 8:43 AM, Pavel A. wrote:

> There’s a saying that if one wants some milk, he don’t have to keep a large
> animal
> (or herd or smaller animals).
> Learning Windows drivers is not easy, and the skills you’d acquire won’t
> buy you much in future.
> If all you need is just one driver, get somebody else to make it.
> You can invest the time and effort in better ways.
>
> Regards,
> – pa
>
> “Piyush Jain” wrote in message news:xxxxx@ntdev.
> …
>
>> Hi,
>> I am trying to learn writing windows device drivers. I tried reading Oney
>> book, but kinda found it complex for beginner like me.
>> I recently more or less completed reading windows 2000 device driver by
>> Art baker and I am slightly comfortable with windbg.
>> I need to know if I need to understand wdm model more throughly thru Oney
>> book before jumping to developing wdf drivers (using book Developing Drivers
>> with the Microsoft Windows Driver Foundation)? or, should I start reading
>> Orwick’s book with samples in it?
>> My target is to learn NDIS 6.2 (must).
>>
>> So from my current situation, how should i proceed? Any help/suggestion
>> would be helpful.
>>
>> [Please note, I cannot afford seminar and I am recent graduate with good
>> OS concepts in general but not windows in specific, which I want to learn]
>>
>
>
>
>
> —
>
> 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’m in the same boat as you Piyush. I’ve learned just enough to get myself into some major trouble. The way I did it was with some books mainly the Winternals (and a few unofficial books) and just wading through all of the examples as was mentioned before(online as well). I even went so far as to grab the actual examples use them as temples and then step through line by line until my eyes hurt and check out each call and what it does. I also got to like the color blue A LOT. Lastly and I’m not sure why it hasn’t been mentioned I’ve been using a virtual machine to do all of my testing. That way I don’t another whole system and I can cut costs… Being that I’m in college I can think of a few other things I can put my money towards than a target system…

I’m not sure what “Winternals” is… but, in any case, as I’ve written many times, you can NOT learn how to write drivers the way you learn how to write C# applications. You can’t just Google around for some shit, hack it up to do what you want, and not be too very concerned about the details.

With kernel-mode driver development, you’re extending the operating system through the interface provided by the I/O Subsystem. If you’re going to extend it, you probably need to know some of the OS’s basic design principles… because you’re going to have to adhere to those same principles in what you write.

Thus, writing a kernel-mode driver really is a multiple-step process:

  1. Learn the salient points of Windows architecture: Thread and processes, key data structures, how you get into and out of kernel mode, how requests are I/O processed, IRQLs, I/O completion, synchronization. Of these you *really* need to understand and internalize the flow of an I/O request from initiation at the user application to completion. AND you need to understand IRQLs. You have no hope, not a PRAYER, of successfully writing a driver in Windows if you don’t understand IRQLs.

  2. Learn your driver model of choice: Choose carefully, preferably with the help of somebody who’s experienced. Because in Windows, the various driver models don’t necessarily overlap. Whether you choose to write a STORPort Miniport, a WDF driver, or a WDM driver matters A LOT. Sometimes only one model applies to the problem you need to solve, and sometimes multiple models apply. It’s key to choose the right one at the start. THEN focus on that model. Hint: Choose the NEWEST appropriate model: NEVER choose WDM when you can choose WDF. NEVER write a SCSIPort driver when you can write a STORPort driver… etc.

It hasn’t been mentioned because you can’t use it to debug a DEVICE driver. Software only drivers, yes; DEVICEs no.

Maybe my next pontification should be on this broader topic…

Peter
OSR

On Fri, Jul 9, 2010 at 8:51 AM, wrote:

> It hasn’t been mentioned because you can’t use it to debug a DEVICE driver.
> Software only drivers, yes; DEVICEs no.
>

That is totally accurate. At the moment I am debugging an AC97 device in a
VM. It looks like hardware as far as the VM is concerned, even though it is
actually software down in DOM0. And with passthrough hardware support
becoming more common, VMs are gaining access to what appears to be hardware.

Mark Roddy

where ‘totally accurate’ means of course ‘not totally accurate’.

Mark Roddy

On Fri, Jul 9, 2010 at 9:06 AM, Mark Roddy wrote:

>
>
> On Fri, Jul 9, 2010 at 8:51 AM, wrote:
>
>> It hasn’t been mentioned because you can’t use it to debug a DEVICE
>> driver. Software only drivers, yes; DEVICEs no.
>>
>
> That is totally accurate. At the moment I am debugging an AC97 device in a
> VM. It looks like hardware as far as the VM is concerned, even though it is
> actually software down in DOM0. And with passthrough hardware support
> becoming more common, VMs are gaining access to what appears to be hardware.
>
> Mark Roddy
>

Thanks Peter for your eye opening inputs !
I am presently devoting 70% of my time to understanding OS internals/WDF
model basics and 30% using windbg and looking into wdk samples and testing
them.

With lots of thanks to all,
Piyush

On Fri, Jul 9, 2010 at 6:37 PM, Mark Roddy wrote:

> where ‘totally accurate’ means of course ‘not totally accurate’.
>
> Mark Roddy
>
>
> On Fri, Jul 9, 2010 at 9:06 AM, Mark Roddy wrote:
>
>>
>>
>> On Fri, Jul 9, 2010 at 8:51 AM, wrote:
>>
>>> It hasn’t been mentioned because you can’t use it to debug a DEVICE
>>> driver. Software only drivers, yes; DEVICEs no.
>>>
>>
>> That is totally accurate. At the moment I am debugging an AC97 device in a
>> VM. It looks like hardware as far as the VM is concerned, even though it is
>> actually software down in DOM0. And with passthrough hardware support
>> becoming more common, VMs are gaining access to what appears to be hardware.
>>
>> 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
>

“piyush jain” wrote in message news:xxxxx@ntdev…
> Thanks Peter for your eye opening inputs !
> I am presently devoting 70% of my time to understanding OS internals/WDF
> model basics and 30% using windbg and looking into wdk samples and testing
> them.

… which gives exactly 100% of wasted time.

The most crucial concept for you to grasp is not WDF.
it’s another 3 letter acronym: ROI (return on investment).
Rather than investing your very precious time and energy that will never
return,
invest some #%&! money to hire a consultant, and save a lot on the bottom
line.
If you/your managers don’t believe in success of the project and receiving
profit at the end - then was is worth to start at all?

You want a jump start, not another semester of learning.

Hope this would at least seed a thought.

Btw, the “consultant” may be another guy near you, that knows exactly NDIS6;
not necessary an expensive “professor” that knows everything.
With all due respect to OSR courses and others, they teach generic
knowledge,
a lot more than one needs for a specific project, that requires time and
effort to understand.
Think where you want to be in two years - still digging in those drivers?
Not likely, there will be lot of other interesting things.

–pa