Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » KMDF   (RSS)
Let's say that you allocated a PIRP and sent it down your device stack. You free the PIRP in the completion routine and then return STATUS_MORE_PROCESSING_REQUIRED. To make life more fun, you decide that you want to be able to cancel the sent IRP after Read More...
One of the WDM escapes in KMDF is EvtDeviceWdmIrpPreprocess (or EvtDevicePreprocessWdmIrp in the API in which you register it) which you can register for by calling WdfDeviceInitAssignWdmIrpPreprocessCallback .  This function allows you to process Read More...
First, I have to say that I don't agree with this design pattern at all . I think it leads to too many problems and complications that are not worth the pain. The only reason I am writing this entry is that I have seen so many people get this wrong or Read More...
When you initially create a PDO, it takes a few steps for PnP to recognize it. I wrote this problem of determining when a PDO becomes a PDO last year . At the end of the post I mentioned that KMDF handles all of this state management for you underneath Read More...
Setting the security descriptor allows you to control who can open a handle to the device object. Typically you can call IoCreateDeviceSecure to create the device object and have the correct DACL from the start. One issue with IoCreateDeviceSecure is Read More...
Previously I wrote about what happens when there are 2 devices in a stack with a name and all of the associated issues that arise from it. In that vein I want to write about what happens when you give your device object a name in KMDF and compare it to Read More...
This problem falls into the category being hidden by a macro that does not indicate in its name what it touches. If you call IoMarkIrpPending on an IRP that you allocated in your driver, chances are that you are corrupting memory. First, let's look at Read More...
Over the past 3 years or so, I have been casually referring to KMDF as the ultimate driver compat layer. Just like Windows has an application compatibility layer which shields applications from OS changes, KMDF provides the same type of compatibility Read More...
In my last post I talked about bidirectional interfaces which can have both input and output parameters. KMDF supports both unidirectional and bidirectional interfaces. As is the case with many KMDF APIs and behaviors, we allow you to implement the easy Read More...
A small but important rule in WDM is that while a PDO is in D0, the parent must be in D0 as well. A very simple statement that can cause a lot of trouble ;). What I have seen is that very few WDM drivers enforce this rule (while KMDF does implement this Read More...
Hindsite in this case is 20/20, but arming your device for wake can open yourself up to multitude of race conditions and hard problems. Some of them you can solve in your driver, some of them you must accept that they are there and leave them be. Arming Read More...
All I can say is that it is a ton of work to review one. We just finished all of the reviews for the WDF book and man was it alot of work! We have an awesome set of writers, I really don't know how they managed it all. From creating the content, taking Read More...
In my previous post , I talked about how state changing PnP IRPs (refered to from now own as just PnP IRPs) are serialized against each other and briefly mentioned which power IRPs they were synchronized against. This merits its own entry. In short, PnP Read More...
KMDF is built on top of public interfaces. This means that it uses only APIs found in the WDK (or what was the DDK). This creates a dilemma. On the one hand we want to add features to the framework that are compelling and add value, but on the other we Read More...
One of the goals of KMDF was to use clear and concise types in our parameters and structures so that their intended use was clear and there was a safe way to use them. Some of them were obvious to us at the start, others were suggested to us by our beta Read More...
More Posts Next page »
 
Page view tracker