Not sure where to post a question?


If you have a question that’s not related to any of the current blog entries, or aren’t sure where to post a question, you can add it as a comment to this one.

Comments (33)

  1. Hi there,

    I’m trying to run the DTM "Unlassified Driver" tests for signing a very simple UMDF-based driver, but get stuck when running the pnpdtest (which is also in the WDK Tools directory).

    It fails early on with a message "Unable to install filter driver…", and even has a file e:vrtmtesttestsrcbasetestpnppnpdtestuserpnpdtest.c line:318.

    Any suggestions on why this filter driver can not be installed? Something I need to implement in the UMDF framework? Any clues will be appreciated.

    Thanks, Peter

  2. Frankie says:

    Hi- I am running WinXP, and was going through my Services because I got an error on reboot, and I see this "Windows User Mode Driver Framework" is set to start automatically, but there are no dependencies on it. A Google search turns up the fact that it is supposed to be a part of Vista, not XP, so I am thinking it probably got installed by Windows Update for some reason (as far as I know, I didn’t install it – and I only choose to install the mandatory security updates) and that’s why I am getting these errors. I would like to know if I can safely turn this off – I wasn’t having any driver problems and I don’t know why it was even installed on my machine. As a user, I really wonder what the decision process is for a piece of software like this to be installed for no reason onto a config that is working. This is a home PC that is used for basic tasks, I really do not want all the latest stuff, I can’t see having any need for a piece of code that was written for Vista being installed onto my working XP. If you guys get paid based upon how many copies are downloaded, that should be changed, because it is a huge waste of time from my standpoint. I deal with technology for my job, and the process for maintaining Linux boxes is so much easier than with you guys – please pass my feedback up the chain, thanks. And also, can you tell me if I can remove this 🙂 ?

  3. Frankie says:

    Just an update. I disabled the "Windows User Mode Driver Framework" service and stopped it and my machine seems to be running fine (slightly faster response time in the UI also, but that may be due to some of the other services I turned off)

  4. PeterWieland says:

    The PNPD test installs an upper filter driver on the device stack that it’s testing.  Due to an oversight on our part we didn’t add this to the list of allowed kernel-mode filter drivers for UMDF (the two entries on that list are the XP and Vista driver verifier).  So when PNPD test installs its upper filter the reflector sees this and refuses to start the device.

    We’re looking at getting the test fixed so that it will work with UMDF devices.  Sorry about that.

  5. PeterWieland says:

    Frankie,

    UMDF is available for XP as well as Vista.  It’s typically installed when you install a device driver that needs it.  It also installs with Windows Media Player 11 to support media players that require it.

    There’s an older version which shipped with WMP 10 that provided the same sort of support.  I believe that one started by default (since it provided RPC calls that WMP 10 would depend on) so it’s possible that it’s the one you had installed.

    I’d be amazed if either of these services had any impact on your system performance.  When idle they should be able to swap out entirely – i can’t see how they’d bog down your UI responsiveness.

  6. Frankie says:

    Thanks for the reply, Peter.

    Just out of curiosity, aside from DRM reasons, why would you ever want drivers to run in the user space? Is that the purpose of this code? To do DRM checks?

  7. PeterWieland says:

    DRM has nothing to do with it.  The question you should ask yourself is why would you ever want drivers to run in the kernel space.  You’ve got some binary blob from a company you’ve never heard of that came with a USB device you bought at the store.  Why would you want to trust that blob of code to behave properly when running in the kernel.

    There are a number of other reasons – it’s easier to do the development, you can do it on a single machine (no bugchecks means you can safely run your test driver on your dev machine), your driver is isolated from other drivers which may misbehave, etc…

    But the main reason is that you don’t really want to run any more code in the kernel than you have to.

    -p

  8. Frankie says:

    Wouldn’t you expect faster performance if they are running in the kernel?

  9. pilgrim9684 says:

    I have been involved with a trade study using the real-time extension to Windows XP provided by Ardence Inc. called RTX. I am pleased with its real-time performance and the fact that my application can literally own the CPU for as long as it needs to do perform critical real-time tasks and to respond to interrupts on peripherla cards in a deterministic manner. I am running into some problems with IRQ assignments though for some of my PCI cards. I think the ACPI feature is getting in the way. Anyone familiar with RTX that can discuss this?

  10. PeterWieland says:

    Frankie,

    There is some extra overhead involved in moving the I/O to and from user-mode.  But it’s a myth that kernel-mode code somehow "runs faster" than user-mode code.

    And while a kernel-mode driver does have less overhead than a user-mode one, it’s also a bigger risk to the end-user.  How much "performance" do you really need out of your keyboard driver?  Now balance that against the risk of some random keyboard filter driver that came with your keyboard having a bug and crashing your computer.

  11. PeterWieland says:

    Pilgrim,

    There are a number of community forrums listed on the left side of my blog (Driver Forums).  I would suggest that you ask your question on one of those.  This isn’t really the right place to start a general discussion.

  12. John Smith says:

    For a Remote Control application, I need to simulate the "Secure Attention Sequence" (Ctrl-Alt-Delete), as the way used to work for XP doesn’t work with Vista, I’m thinking about writing a UMDF instead of modifying the DDK WDM kbfilter. Do you know if there is some kind of HID supervisor which could block the SAS? (We really need to simulate the SAS, as it is required for log-in start on Vista machines operating on a Windows domain).

    Thank you!

  13. dzagar says:

    I would like to use winusb driver from the perspective it was designed to be used – user mode application development. Default winusb.h and winusbio.h recurse deeply into the WinDDK source (header) tree, and there is no linkage library (.lib) available for Visual Studio.

    Is there any kind of wapper available in the source code that would wrap all necessary things needed for application development without the need for WinDDK installation – in other words – straight from the Visual Studio 🙂

    Thanks!

  14. fredrik says:

    Hi, I wan´t to build an application in C# that uses the winusb.dll, has someone ever tryed this? I can´t find any examples anywhere!

  15. soumya says:

    Hi,

    I ve developed a simple upper filter driver for CDROM.I want to get responses on the debugview while reading and writting to the cdrom. But i am not getting any message over thr.

    I used the devcon to install the driver.

    And also I tried with create service,open service start service etc to install it. But none is working.

    I am new to this area. Please help in solving this.

    Thanks in advance,

    Soumya

  16. PeterWieland says:

    Soumya,

    There is a storage filter driver sample in the WDK that you could probably start from (srcstoragefilterdiskperf).  There is also a sample tool called "addfilter" in the srcstoragefilter directory that will add your filter driver to a device.  I would suggest you start there.

    There are generally two ways to install a filter driver:

    1 – Install the filter files and service in the INF for the device & set one of the filter registry keys to list your filter driver.  See http://msdn2.microsoft.com/en-us/library/ms791322.aspx for an example.  This works best when you own the function driver for the device as well.

    2 – Use a programatic tool like addFilter to modify the configuration for an already installed device stack.  

    3 – Set your filter as a device-class filter so that it loads automatically on all instances of that device class.

  17. alishoev says:

    We are writing a special plotter driver and we are seeing some

    strange things when we are looking at the GLYPHPOS structures being sent to OEMTextOut call…

     The glyphs start out their position correctly but at some point we get a negative Y coordinates or the offsets for the Y coordinates restart at low numbers and all text lines are getting mixed.

    We noticed that it starts happening when Y > 7200 in

    *PrintableArea: PAIR(7200, 7200) of GPD file

    We need to support big table sizes 48×48 inches and have to have a good text quality for small fonts so we need to set

     *DPI: PAIR(1200,1200)

     *TextDPI: PAIR(1200, 1200)

    If we set DPI for lower number Windows programs like Corel returns low quality Text. Setting DPI for low resolution but TextDPI for high resolution doesn’t make text better. Are there any limitation on DPI * Y Size?

    Any help would be greatly appreciated.

  18. PeterWieland says:

    Alishoev,

    I don’t know anything about display devices so i can’t help with that.  But there are several links on the left hand side of the page for community resources (newgroup & the ntdev mailing list) where you could ask this question.

    Thanks,

    -p

  19. nkutty says:

    Hi Peter,

    Has there been any resolution wrt to the PNPD test failure for UMDF devices?

    Can you provide guidance for obtaining WHQL certification for UMDF devices? In our case, it’s for a SideShow device.

    thanks,

    Nanda

  20. Nike says:

    Hi everyone,

    I want to write a UMDF driver.

    I have a usb device,i want to send data to the device,the device can show

    some information after the device receive the data.

    I installed the driver.(windowssideshowbasicedriver.dll and windowssideshowbasicedriver.inf)

    I want to debug the UMDF driver, so i can get a feel for how the driver works.

    I do as follows.

    First,install the windbg and set the HostProcessDbgBreakOnStart to 0x00000004(4).

    Second,open the debugging environment.Start-All Programs-WDK-WDK6000-Build Environments-Windows Vista and windows server Longhorn x86 Checked Build Environment,

    right click on the icon for the debugger, and choose “run as administrator”.

    Change the directory to c:program filesdebugging Tools for windows,run windbg -pn WUDFHost.exe.

    But it show,

    "There is more than one ‘WUDFHost.exe’ process running .Find the process ID of the instance are interested in and use -p<pid>."

    So i run follow command

    tasklist.exe

    I can see two WUDFHose.exe image , one WUDFHost PID  Session Name is 2408, other is  3032.

    When i run windbg -p 2408 or windbg -p 3032 ,it will show

    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:Windowssystem32ntdll.dll –

    ntdll!DbgBreakPoint:

    77aa2ea8 cc              int     3

    What is worry with this ?

    Can you hele me ?

    Thanks!

    I get the debug information from  http://msdn2.microsoft.com/en-us/library/aa510991.aspx

    but i can not success.

  21. mintyice says:

    I am trying to download WDK and I have an XP.

    I went to MS Connect and I saw 2008 server and Vista.

    Is 2008 server one compatible with XP?

  22. feretich says:

    I am writing a Windows XP (& later) WDM kernel driver for a USB device. The device sends asynchronous messages from a bulk transfer endpoint. I am trying to keep a read operation posted continuously to this endpoint. There are two major questions for which I need to find answers to move forward on the design.

    Reads to this endpoint are accomplished via asynchronous Irps (created by IoAllocateIrp). If I receive certain messages, I need to quickly (in <8msec) send a message to a different endpoint. To meet this timing requirement, I have structured my ReadIrpCompletion routine (expected to be running at the DISPATCH_LEVEL) to:

    1) Parse the received message.

    2) If the message requires an immediate response, then start a write operation to the outbound pipe (this operation uses its own Irp.) by calling IoCallDriver with an appropriate URB.

    3) Then reissue the read for the next inbound message by calling IoCallDriver reusing the original URB and Irp.

    4) Perform some cleanup and queue management, then return STATUS_MORE_PROCESSING_REQUIRED.

    My questions are:

    1) When my ReadIrpCompletion routine reissues the read (step 3) is it possible that the lower level USB driver will call my ReadIrpCompletion routine to process the completion of the second read before it returns to me.

    2) At what point does the lower level USB driver throw away an inbound message? That is, if a new inbound message(s) arrives during step 1 or 2 will I receive it when I issue the read in step 3?

    Thanks,

    Bob Feretich

  23. feretich says:

    After considering the problem for a day, I’m thinking that my best route is to have the ReadIrpCompletion routine reissue its Irp to read the next inbound message in a DPC. That way ReadIrpCompletion routine cannot be re-entered before it returns, thus making my design insensitive to the answers to the questions that I previously posed.

    I still would appreciate your thoughts though.

    Thanks,

    Bob Feretich

  24. krishhh says:

    Hi,

    I’m writing a driver for a storage controller. And I was thinking of doing it the WDF way. Are there any plans to move the ataport/+miniport (msahci & atapi.sys) to KMDF? If I want to do it by myself, which class drivers needs to be re-written? Any suggestions/opinions are most welcome. Thanks in anticipation.

  25. Simon ATex says:

    Hi Peter,

    I’m a new new comer on driver land :(. After I read some introduction docs from MSDN about UMDF, I have some question I don’t know where I can ask. Could you please help me?

    1. Can I write a User-Mode driver to control copying some files (located by Database) to terminal devices like USB, DVD,…?

    2. I know we can use Win32API in UMDF, but I don’t know I can access to database by ADO here.

    Thanks,

    Simon.

  26. alexlihk says:

    Dear Expert,

    I want to capture the disk change. How can I start to program storage addfilter?

    which book I should read or any example for writing simple filter?

    thx.

    alexli

    alexli@bizcon.org

  27. asmfan says:

    How to overcome memory limitations on access to UM buffer via DIRECT_IO or BUFFERED_IO?

    +how to get a job at MS?=)

  28. wkruimer says:

    I used your winusb.inf example file to create a driver installer for a winusb compatible device on windows XP

    In the new winusbconstaller2.ddl there were some bugs in winusb fixed.

    When just renaming/replacing the old winusbconstaller.dll by the winusbconstaller2.dll

    I go the message that the system could not load the driver (code 39) corrupted or missing.

    Any hint would be appreciated?

  29. lmj_ says:

    I don’t really have a question, I just wanted to thank you for your hard work on UMDF. I just wrote my first device driver – in Windows, no less, with no Win32 API experience of any sort – and I’m impressed with how easy  it all was.

    Keep up the good work!

  30. gnolkha says:

    I am trying to write an Audio Driver.

    Should I go for WDF framework or WDM?

  31. Ewan Bingham says:

    We make a device which uses a signed FTDI driver (we have some PIDS assigned to us, and are MS signed) and I want to find where to look to get help developing a driver which will launch my application when our driver is loaded. I see lots of stuff about launching application installers when a driver is installed. But I cannot see where to get the  knowledge needed to get my app to launch when my device is connected, as opposed to first installed. I already use DiffX to install drivers with each app install. Any ideas as to where to look would be gratefully received.

  32. Sumeet says:

    Hi,

    I have to develop a music player component in windows as well as in web without using any inbuilt component

    so that it can be call from any language either .net or through any open source it should be like a web services

    Which technology should i go for  ?? .

    Thanks

    Sumeet

  33. Prabhat Srivastava says:

    Hi

    I have an buisness requirement where Transparent window is supposed to handle the Mouse Events in VC++ MFC application. I am unable to capture the mouse event from the transparent window as events are passed to beneath windows. So is there any way through this can be achived in MFC Application.Reply will be highly appreciated.Please help in solving this issue.

    Thanks

    Prabhat