My apologies if this has been discussed before.
Did anyone try to install the Ramdisk sample driver from KMDF 1.1 ?
I’ve decided to get my feet wet with KMDF and start learning it. I took the first sample that looked like simple enough place to start with, compiled it, but could not get it to work.
The ‘Add new device’ wizard seems to install the driver, but reports an error on the last page.
The ‘devcon’ utility seems to install the driver and reports no errors, but the device is listed as ‘Unknown device’ in the device list and does not work.
Using the ‘update driver’ button seems to resolve the problem - the driver gets its proper name and is reported as functioning properly, but no ram drive is created.
Another thing that seems to go wrong is that the ramdisk.inf file contains a few registry entries to be added to the Parameters key for the driver, but they don’t appear anywhere in the registry. Adding them manually and restarting the computer does not make the ram drive to appear.
I’ve tried it on two computers with Windows Server 2003 SP1 and Windows XP Pro with SP2, with the same result. The driver was built with the latest DDK (3790.1830) and KMDF 1.1.
Does it mean that the ramdisk sample is broken? (I hope not). Any suggestions? Should I move on to another sample?
Thanks a lot in advance.
After playing with it some more:
During the installation, the following lines appear in WinDbg:
WdfCoInstaller: [08/05/2006 15:02.51.484] DIF_INSTALLINTERFACES
WdfCoInstaller: [08/05/2006 15:02.51.671] Path to INF files: d:\ramdisk\
WdfCoInstaller: [08/05/2006 15:02.51.703] ReadWdfSection: Checking WdfSection [DiskInstall.NT.Wdf]
WdfCoInstaller: [08/05/2006 15:02.51.781] Extracting WDFCAB_RESOURCE from wdfcoinstaller01001.dll to C:\WINDOWS\Temp\WdfTemp\WDF.cab
WdfCoInstaller: [08/05/2006 15:02.51.968] file: C:\WINDOWS\Temp\WdfTemp\WDF.cab, time-stamp: [08/05/2006 21:02.51.812], size: 1402926 bytes
WdfCoInstaller: [08/05/2006 15:02.52.015] Check C:\WINDOWS\Temp\WdfTemp\WDF.cab for trusted signature
WdfCoInstaller: [08/05/2006 15:02.52.171] CheckWinTrust(C:\WINDOWS\Temp\WdfTemp\WDF.cab) returns S_OK
WdfCoInstaller: [08/05/2006 15:02.52.218] VerifyFileTrust: exit: C:\WINDOWS\Temp\WdfTemp\WDF.cab, error(0) The operation completed successfully.
WdfCoInstaller: [08/05/2006 15:02.52.390] C:\WINDOWS\Temp\WdfTemp\WDF.cab has been extracted to C:\WINDOWS\Temp\WdfTemp
WdfCoInstaller: [08/05/2006 15:02.52.468] component [0] : C:\WINDOWS\Temp\WdfTemp\wdf01000.inf
WdfCoInstaller: [08/05/2006 15:02.54.421] Final status: error(1603) Fatal error during installation.
WdfCoInstaller: [08/05/2006 15:02.55.109] DIF_DESTROYPRIVATEDATA
WdfCoInstaller: [08/05/2006 15:03.02.703] Unrecognized DIF_ value 41 (0x29)
WdfCoInstaller: [08/05/2006 15:03.09.468] DIF_DESTROYPRIVATEDATA
However, after doing the ‘Update driver’ routine, the driver seems to be installed:
WinObj shows that both the \Driver\ramdisk and \Device\ramdisk are present
DeviceTree shows that both the \Driver\ramdisk and \Device\ramdisk are present
However, setting the registry value BreakOnEntry to 1 does not make it break, even after the computer is restarted.
And no debug output appears in WinDbg from the driver.
And yes, I’m testing a checked build of the driver.
Any ideas?
I wish I could get this driver working and start tweaking it to learn KMDF…
Andrei.
Yet another update:
I’ve just tried the same thing with the echo sample, and exactly the same error is happening, even worse: the ‘Update driver’ facility results in the same error as installing it with the ‘Add hardware’ wizard.
I’m hoping I’m missing some trivial (but not obvious for a KMDF newbie like me) step that needs to be done to make the sample drivers install and work.
Thanks again!
Andrei.
There is a %windir%\wdf*.log, what does it say?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@winability.com
Sent: Saturday, August 05, 2006 2:49 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Cannot install WdfRamdisk sample driver from KMDF
1.1
Yet another update:
I’ve just tried the same thing with the echo sample, and exactly the
same error is happening, even worse: the ‘Update driver’ facility
results in the same error as installing it with the ‘Add hardware’
wizard.
I’m hoping I’m missing some trivial (but not obvious for a KMDF newbie
like me) step that needs to be done to make the sample drivers install
and work.
Thanks again!
Andrei.
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
> There is a %windir%\wdf*.log, what does it say?
It says:
“Wdf01001 Setup cannot update a checked (debug) system with a free (retail) version of Wdf01001, or vice versa.”
That was it, thanks! I was trying to install a checked build of KMDF coinstaller on a free system. Once I’ve replaced the checked build with the free one, the install completed OK and the ramdisk sample is now fully operational.
Now that I know about the log file, hopefully I’ll be able to solve such errors on my own 
Thanks a lot once again!
Andrei.