Where to start?

I am a newbie to Windows driver programming. After searching for which technology and tools to use, it is still unclear to me.
The hardware to write a driver for is a PCIe board with DMA functionality (gather/scatter).
The target OSs are XP 64-bit and in the near future Vista 64-bit.

Yesterday I discovered WDK 6000 on our MSDN discs, but after reading the release notes, it seems that this is not production ready and XP 64-bit support is not available.
So, which DDK/WDK should I use?

I suppose that WDF is the correct framework to use.
Can anyone recommend a good introductory book to WDF?

The hardware board will do compression of a user supplied buffer. Which example driver can I use to start from?

Thanks

first try to write write a simple driver like hello world and then go for
complex programs.
there is a sample hello world program in “code project” site.
Use OSR loader to load your driver. Best of luck !

xxxxx@barco.com wrote:

Yesterday I discovered WDK 6000 on our MSDN discs, but after reading the release notes, it seems that this is not production ready and XP 64-bit support is not available.
So, which DDK/WDK should I use?

That is a misprint in the WDK 6000 - use it anyways.

I suppose that WDF is the correct framework to use.
Can anyone recommend a good introductory book to WDF?

Yes, use KMDF - OSR has a book soon to be released and MS Press has a
book that was release 2 weeks ago or so… I
can’t remember what it was called, but these are the only two books on
the subject, a quick google will turn up the MS Press
book.

The hardware board will do compression of a user supplied buffer. Which example driver can I use to start from?

This and the XP 64bit dollar question I’m going to have to leave to someone else.

The WDK 6000 is released and production quality. The release notes may be stale. To build for XP64 you compile for W2k3 x64.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-287692-
xxxxx@lists.osr.com] On Behalf Of MM
Sent: Wednesday, May 23, 2007 6:07 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Where to start?

xxxxx@barco.com wrote:

>Yesterday I discovered WDK 6000 on our MSDN discs, but after reading
the release notes, it seems that this is not production ready and XP
64-bit support is not available.
>So, which DDK/WDK should I use?
>
>
That is a misprint in the WDK 6000 - use it anyways.

>I suppose that WDF is the correct framework to use.
>Can anyone recommend a good introductory book to WDF?
>
>
Yes, use KMDF - OSR has a book soon to be released and MS Press has a
book that was release 2 weeks ago or so… I
can’t remember what it was called, but these are the only two books on
the subject, a quick google will turn up the MS Press
book.

>The hardware board will do compression of a user supplied buffer.
Which example driver can I use to start from?
>
>
This and the XP 64bit dollar question I’m going to have to leave to
someone else.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

>I am a newbie to Windows driver programming. After searching for which technology and tools to use, it is still unclear to me.

The hardware to write a driver for is a PCIe board with DMA functionality (gather/scatter).
The target OSs are XP 64-bit and in the near future Vista 64-bit.

Yesterday I discovered WDK 6000 on our MSDN discs, but after reading the release notes, it seems that this is not production ready and XP 64-bit >support is not available.
So, which DDK/WDK should I use?

I would highly recommend to go for the WDK. I wrote the same driver (USB) in the DDK (about a year ago) and ported it to the WDK now. PNP is mostly done under the hood (WDK) which gets you started quickly.

I suppose that WDF is the correct framework to use.
Can anyone recommend a good introductory book to WDF?

Someone mentioned the new books already. Buy them both! As I said, a lot is done under the hood now. There are lots of wrapper functions in the WDF that make your programming easier. If you want to understand what’s going on I would recommend you the buy Walter Oney’s “Programming the Microsoft Windows driver model” second edition. You won’t find anything about the WDK in there (because it didn’t exist) so you get to see the driver world from another perspective.

Johannes

The hardware board will do compression of a user supplied buffer. Which example driver can I use to start from?

Thanks

As for which sample to start with, I would suggest the KMDF pcidrv
sample (wdkroot\6000\src\kmdf\pcidrv). It demonstrates both KMDF and DMA
s/g functionality. I would stick to the WDK samples to start and then
venture off into public samples from codeproject and those types of
sites…purely from the POV that the WDK samples have at least been
reviewed and should be showing best practices.

Stick with INF based installation and avoid the OSR driver loader for
now, just keep things simple ;).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@barco.com
Sent: Wednesday, May 23, 2007 1:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Where to start?

I am a newbie to Windows driver programming. After searching for which
technology and tools to use, it is still unclear to me.
The hardware to write a driver for is a PCIe board with DMA
functionality (gather/scatter).
The target OSs are XP 64-bit and in the near future Vista 64-bit.

Yesterday I discovered WDK 6000 on our MSDN discs, but after reading the
release notes, it seems that this is not production ready and XP 64-bit
support is not available.
So, which DDK/WDK should I use?

I suppose that WDF is the correct framework to use.
Can anyone recommend a good introductory book to WDF?

The hardware board will do compression of a user supplied buffer. Which
example driver can I use to start from?

Thanks


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

xxxxx@barco.com wrote:

I am a newbie to Windows driver programming. After searching for which technology and tools to use, it is still unclear to me.
The hardware to write a driver for is a PCIe board with DMA functionality (gather/scatter).
The target OSs are XP 64-bit and in the near future Vista 64-bit.

Yesterday I discovered WDK 6000 on our MSDN discs, but after reading the release notes, it seems that this is not production ready and XP 64-bit support is not available.

Neither of those statements is true. The 6000 WDK is final and
production-ready. Someone, by mistake, left a “pre-release” notice in
the release notes.

Windows XP 64-bit is actually a marketing invention. There is no 64-bit
version of XP. What you have is actually Windows Server 2003 64-bit,
with the operating system name changed. The WDK fully supports this.

I suppose that WDF is the correct framework to use.
Can anyone recommend a good introductory book to WDF?

“Programming Drivers with the Windows Driver Foundation” is now
available from Microsoft Press.

The hardware board will do compression of a user supplied buffer. Which example driver can I use to start from?

What kind of compression? How will it be used? If this is for
compression of multimedia streams, so that you need to participate in
DirectShow graphs, then you probably want to look at writing an AVStream
driver. If this is some kind of custom compression that will only be
used by your own applications, then almost any of the samples would
work. The PLX9x5x sample might be a good starting point, since it does DMA.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Many thanks for all the valuable information.
Today I ordered both books from Microsoft.

Tim, the compression will be used only by dedicated applications.
The application will provide a buffer to the device; the device will return compressed data.
Is the PLX9x5x still the best choice for this kind of device (PCIe with S/G DMA and dedicated application supplied in- and out-buffers)?

xxxxx@barco.com wrote:

Tim, the compression will be used only by dedicated applications.
The application will provide a buffer to the device; the device will return compressed data.
Is the PLX9x5x still the best choice for this kind of device (PCIe with S/G DMA and dedicated application supplied in- and out-buffers)?

Doron also suggested the pcidrv sample. Since he was a key player in
the design and development of KMDF, you should probably take his advice
before taking mine. :wink:

The key is to grasp the principles. I tend to use the samples as a
source of snippets rather than whole modules. With KMDF (and unlike
WDM), you can wrap your head around the basics in relatively short
order, so that you can just write your basic code from scratch rather
than copying everything.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Don’t defer to me that quickly ;). I think that your suggestion for
looking at the PLX sample is also a great place to start. I think that
studying both samples is a good way to go, both have their quirks and
individual functionality and the union of the 2 is better then either by
itself.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Thursday, May 24, 2007 10:14 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Where to start?

xxxxx@barco.com wrote:

Tim, the compression will be used only by dedicated applications.
The application will provide a buffer to the device; the device will
return compressed data.
Is the PLX9x5x still the best choice for this kind of device (PCIe
with S/G DMA and dedicated application supplied in- and out-buffers)?

Doron also suggested the pcidrv sample. Since he was a key player in
the design and development of KMDF, you should probably take his advice
before taking mine. :wink:

The key is to grasp the principles. I tend to use the samples as a
source of snippets rather than whole modules. With KMDF (and unlike
WDM), you can wrap your head around the basics in relatively short
order, so that you can just write your basic code from scratch rather
than copying everything.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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