DwmApi.dll missing for UMDF driver on XP (??)
-
I'm currently struggling with writing a simple UMDF driver for USB Device Firmware Upgrade (DFU) to be used on WinXP. I've used the final stage of the OSR USB Fx2 sample as starting point, but removed the read/write queue since the communication is done on ep0 solely. It builds fine. When I power up my device and try to install the driver it fails to start the driver and complains about a missing file (error code 10). I fired up the Dependency Walker and it tells me that it cannot find DwmApi.dll. I've tried to build with the build environment for both Vista and XP but the result stays the same. What I've gathered from reading forums and such is that the DmwApi library is not used on XP platform and is designed for Vista. The problem "may be fixed from repairing the .NET installation" and I've tried this, but with the same result. If I use the WdfVerifier and configure it to break when the WdfHost process starts, it fails and tells me that a file is missing. I suppose it's the same file, DwmApi.dll. My question is simply "where did I screw up"...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
I'm currently struggling with writing a simple UMDF driver for USB Device Firmware Upgrade (DFU) to be used on WinXP. I've used the final stage of the OSR USB Fx2 sample as starting point, but removed the read/write queue since the communication is done on ep0 solely. It builds fine. When I power up my device and try to install the driver it fails to start the driver and complains about a missing file (error code 10). I fired up the Dependency Walker and it tells me that it cannot find DwmApi.dll. I've tried to build with the build environment for both Vista and XP but the result stays the same. What I've gathered from reading forums and such is that the DmwApi library is not used on XP platform and is designed for Vista. The problem "may be fixed from repairing the .NET installation" and I've tried this, but with the same result. If I use the WdfVerifier and configure it to break when the WdfHost process starts, it fails and tells me that a file is missing. I suppose it's the same file, DwmApi.dll. My question is simply "where did I screw up"...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknownWith Dependency Walker you have to differentiate between delay-loaded DLLs and static DLLs. Delay-loaded DLLs have an hourglass icon against them in the tree and module list; they're loaded when the first function in them is actually referenced. It's unlikely that DWMAPI.DLL is the problem, as it shouldn't be actually referenced by code running on XP. In my case DWMAPI.DLL always shows up as missing when checking almost anything, because it's delay-loaded by IEFRAME.DLL if you've installed Internet Explorer 7 on Windows XP. In turn that's delay-loaded by MSHTML.DLL, which is delay-loaded by SHDOCVW.DLL, and that by SHELL32.DLL. There will be some other DLL that isn't present.
DoEvents: Generating unexpected recursion since 1991
-
With Dependency Walker you have to differentiate between delay-loaded DLLs and static DLLs. Delay-loaded DLLs have an hourglass icon against them in the tree and module list; they're loaded when the first function in them is actually referenced. It's unlikely that DWMAPI.DLL is the problem, as it shouldn't be actually referenced by code running on XP. In my case DWMAPI.DLL always shows up as missing when checking almost anything, because it's delay-loaded by IEFRAME.DLL if you've installed Internet Explorer 7 on Windows XP. In turn that's delay-loaded by MSHTML.DLL, which is delay-loaded by SHDOCVW.DLL, and that by SHELL32.DLL. There will be some other DLL that isn't present.
DoEvents: Generating unexpected recursion since 1991
Yep, I realized that the DwmApi lib is delay loaded. On the other hand it was the only file I found to be missing. I guessed that it could not be this file, but thought "I don't know everything so it might be this file anyway". Something has happened to my system, or I am making some kind of mistake, but neither my driver nor the UMDF example drivers will install correctly. Every single one fails to start with error code 10. The most simple one is 'socketecho'. I have installed previously and even though it didn't work as I expected in overlapped mode, it installed and started as expected at that time. Now it doesn't start when I install it any longer. I've tried to install the driver on other machines as well, but still with error code 10, so I guess it's related to the build tools and/or the .inf-file. This is my first contact with WDF/UMDF and I haven't found very much help on the net. It seems like the framework isn't very well utilized. Even the forum on the MS Connect site contains about 10 posts from the last two years. Any idea?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
Yep, I realized that the DwmApi lib is delay loaded. On the other hand it was the only file I found to be missing. I guessed that it could not be this file, but thought "I don't know everything so it might be this file anyway". Something has happened to my system, or I am making some kind of mistake, but neither my driver nor the UMDF example drivers will install correctly. Every single one fails to start with error code 10. The most simple one is 'socketecho'. I have installed previously and even though it didn't work as I expected in overlapped mode, it installed and started as expected at that time. Now it doesn't start when I install it any longer. I've tried to install the driver on other machines as well, but still with error code 10, so I guess it's related to the build tools and/or the .inf-file. This is my first contact with WDF/UMDF and I haven't found very much help on the net. It seems like the framework isn't very well utilized. Even the forum on the MS Connect site contains about 10 posts from the last two years. Any idea?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknownRunning iTunes? http://www.osronline.com/showThread.cfm?link=131578[^] You could probably do worse than asking on the NTDEV mailing list[^].
DoEvents: Generating unexpected recursion since 1991