Welcome to MSDN Blogs Sign in | Join | Help

Pointless Blathering

Peter Wieland's thoughts on Windows driver development, and occasional rants about computing in general.
Building the UMDF 1.0 (beta) samples

I'm sorry it's taken me so long to write about this.  The last week or two have been pretty hectic as we try to lockdown for Vista.  But we still want people to download the UMDF 1.0 beta, and here are the instructions for that.

The first step, of course, is to install the WDK.  You can either use the Beta 2 WDK or the 5456 version which was recently published on the beta site.  If you don't have either of these installed yet, you can my earlier blog entry on installing the WDK.

Next you need to download the UMDF beta bits and install those on your development machine as well.  Go to the connect.microsoft.com site for the beta & look under downloads.  You will see several items but you want to download and run either "UMDFx86" or "UMDF64" depending on the architecture of your development machine (not your test machine).  Download and install the MSI and you'll be ready to go.

To actually build one of the samples you'll want to start a "Windows Vista and Windows Server Longhorn" build environment from the WDK.  This is burried under "Windows Driver Kits" on your start menu.  Be sure you either use the 5483 or 5456 WDK ... if you have Beta 1 or the February CTP kit still installed those may not work.

Once you've started your build window, you need to run a script to tell it to use the headers & all from the MSI you just installed rather than the ones in the kit.  Do the following:

    cd \WinDDK\WDF\UMDF10_xp
    set_umdf_env.cmd
    cd src\umdf
    build -cZ

And you've just built the UMDF 1.0 samples.

Next time i'll walk through installing the echo sample driver.

Posted: Wednesday, June 28, 2006 7:45 PM by PeterWie

Comments

Shaul Eizikovich said:

That was easy, Thank you.
Now, trying to install the 'skeleton' was not that easy. I wish you try this.
However, trying to debug skeleton is really frustrating.
Going through the WDK manual, I learnt that I had to change the HostProcessDbgBreakOnStart registry entry, but unfortunately it does not exist.
Than I had to attach WinDbg to process WUDFHost.exe which also did not exist. Outch.
I must have been terribly out of line. Any idea?
Thanks
  Shaul
# August 3, 2006 2:38 AM

people said:

When can you tell us how to install the sample of echo? I get nothing after follow the instruction from DDK.

# November 22, 2006 3:38 AM

gadit said:

Hi,

I currently have a driver which is written in WDM.

This driver receives bulk messages from the device, and transfers it to applications which are running on the host (they are polling all the time).

At current state, only one application receives a message, and I want to extend the driver to send the messages to all applications which are registered to it (by send I mean respond to their Read operation).

I will copy the message into buffers and use separate queues for each application.

My question is, can I use UMDF to write a filter driver which will be above my WDM driver in the stack? Is it easier than to change the WDM driver? Or maybe it's easier to write the whole driver from scratch, using UMDF only? And if so, does the current UMDF version (1.0) support it? (I saw that it does not have WinUSB)

I need it to run on both XP and Vista. I understand that only 1.5 will support Vista. Will it be released on the short term? And while I'm waiting, is the beta version stable enough to use it to write the driver? Does the beta version and 1.5 version have full USB support for my goals?

Thanks,

Gadi Tunes

# December 6, 2006 10:24 AM

PeterWie said:

Gadit -

Yes i think you should be able to use UMDF for this, either as a filter or by rewriting your driver.  You can create a manual queue for each file object (parented off the device but have a pointer to it in the file and delete it when the file is closed) to enqueue requests from each app.  When you get data back you go to each file's queue, pull off the next request (if there is one), copy the data into its buffer, then complete the request.

Of course this gets a bit more complex if apps can issue reads smaller than the packet size ... you might need to build a ring buffer for each file, but it's definately possible.

As to UMDF 1.5 - it's complete and is in the final build of the Vista WDK (along with WinUSB+KMDF 1.5 which are required for USB support).

# December 6, 2006 2:45 PM

PeterWie said:

people -

i'll make it my next post.  Sorry it's taken so long to get back to this - I took some vacation time off after we shipped Vista.

-p

# December 6, 2006 2:46 PM

gadit said:

Thank you for the info.

I just want to make sure that it will be able to run on both Vista and XP (the UMDF 1.5 version), including all WinUsb features, and supporting power management.

I saw that some modifications need to be made to the INF files in order for it to run on XP, I just want to make sure that that's all, and there are no other differences or any USB feaures that I will encounter that cannot be implemented with UMDF 1.5.

Thanks again,

Gadi

# December 26, 2006 12:03 PM

PeterWie said:

Gadit,

I finally posted a blog entry on how to modify the UMDF sample INFs to use the WinUsbCoinstaller in order to install on both XP and Vista.

# January 10, 2007 2:28 PM

RobD said:

I am trying to build some of the umdf example drivers. I have downloaded the latest WDK and UMDF.

I opend the Build environment "Windows XP Free Buld" en did first "C:\WinDDK\WDF\UMDF10_xp>set_umdf_env.cmd".

When I try to build the any of the UMDF example drivers, I get the folowing results:

What is the problem?

UMDFC:\WinDDK\WDF\UMDF10_xp\src\umdf\usb\fx2_driver\step1>bcz

BUILD: Compile and Link for x86

BUILD: Start time: Sat Feb 10 15:15:19 2007

errors in directory c:\winddk\wdf\umdf10_xp\src\umdf\usb\fx2_driver\step1

obj_path is set for you. You may not set it.

BUILD: Examining c:\winddk\wdf\umdf10_xp\src\umdf\usb\fx2_driver\step1 directory

for files to compile.

BUILD: Compiling c:\winddk\wdf\umdf10_xp\src\umdf\usb\fx2_driver\step1 directory

_NT_TARGET_VERSION SET TO WINXP

Compiling - osrusbfx2.rc

Compiling - dllsup.cpp

Compiling - comsup.cpp

Compiling - driver.cpp

Compiling - device.cpp

Compiling - generating code...

Building Library - objfre_wxp_x86\i386\wudfosrusbfx2_1.lib

link : error LNK1104: cannot open file 'C:\DOCUME~1\TON'

Building Library - objfre_wxp_x86\i386\wudfosrusbfx2_1.lib

BUILD: Linking c:\winddk\wdf\umdf10_xp\src\umdf\usb\fx2_driver\step1 directory

_NT_TARGET_VERSION SET TO WINXP

Building Library - objfre_wxp_x86\i386\wudfosrusbfx2_1.lib

link : error LNK1104: cannot open file 'C:\DOCUME~1\TON'

NMAKE : fatal error U1073: don't know how to make 'C:\WinDDK\6000\lib\crt\i386\s

trsafe.lib'

nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDL

L=1 MAKEDIR_RELATIVE_TO_BASEDIR= MAKEDIR_LOWERCASE=c:\winddk\wdf\umdf10_xp\src\u

mdf\usb\fx2_driver\step1 failed - rc = 2

BUILD: Finish time: Sat Feb 10 15:15:22 2007

BUILD: Done

   7 files compiled - 2 Errors

   3 libraries built - 3 Errors

# February 10, 2007 9:31 AM

Fileds said:

I also encounter build error same as RObD, Hope somebody can make the UMDF more useability.

# April 27, 2007 11:44 PM

PeterWie said:

RObD,

The latest WDKs (the Vista build for example) already contain UMDF 1.5.  You don't need to download UMDF 1.0 any longer.

The UMDF 1.0 kit wasn't designed to work with the Vista WDK (since it wasn't released when 1.0 came out) so that's probably the source of your build issues.

-p

# May 1, 2007 11:17 AM
Anonymous comments are disabled
Page view tracker