Re: USB Bulk Driver & Windows 2000

It appears to be oddly busted for me as well.

On Fri, Feb 22, 2008 at 2:43 PM, wrote:

> I have a USB driver, based on the WDM - USB Bulk Transfer Driver Sample,
> it work fine on XP and Vista.
>
> I recently got a request to support W2K, but I when I tried to build the
> DDK samples with the WDK 1.7 Windows 2000 build window, none of the WDM
> USB samples get built.
>
> It is the same for all three DDK versions:
>
> WDK 6001.18000 - Windows Server 2008 WDK
> DDK 3790.1830 - Windows Server 2003 SP1 DDK
> DDK 2600.1106 - Windows(R) XP Service Pack 1 DDK
>
> Can I use this driver on Windows 2000?
>
> Thanks
> Robert
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

Mark Roddy wrote:
[BulkUSB buld does not work in Win2000 build environment]

It appears to be oddly busted for me as well.

A nice WDK example of how not to do error messages:

You need to build in the WinXP environment,
but the driver will run in Win2000.

Took me a half day to find out…

Interesting, however building for XP and running downlevel is completely
unsupported and if it works you are just lucky. This also leaves unanswered
the questions of why these drivers don’t build for w2k and why there is
simply no clue in the build output as to what went wrong. WDK 6000 has the
same issue. If there is some secret incantation that says ‘don’t build for
w2k’ I’d like to know what that is.

On Fri, Feb 22, 2008 at 4:31 PM, Hagen Patzke wrote:

> xxxxx@hotmail.com wrote:
>
> > I have a USB driver, based on [BulkUSB]
>
> > I recently got a request to support W2K, but I when I tried to build
> > the DDK samples with the WDK 1.7 Windows 2000 build window, none of
> > the WDM USB samples get built.
>
> Yes, I had the same problem. You need to build in the WinXP environment,
> the BulkUSB binary compiled there will also run on Win2000.
>
> If you added to the BulkUSB driver by introducing calls that did not
> exist on Win2000, you’ll have to find a way around linking to them.
> Dynamic loading is fine (you have to do it OS-dependent, of course, as
> demonstrated by some PnP code in the sample).
>
> > Can I use this driver on Windows 2000?
>
> Out of the “box” (WDK 6000 RTM) the BulkUSB.sys file will work on
> everything from Win2K up to Vista32.
> (Up to Vista64 if you build it and sign it.)
>
> With extremely minor tweaking (scrapping one macro definition introduced
> with WinXP), it will run on Windows ME, too.
>
> To also support Windows 98 SE, buy the book from Walter Oney (you need
> wdmstub.sys and the redistribution license for it) and a tiny little
> more tweaking.
>
> The hardest remaining part is in fact the INF file. :slight_smile:
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

I can’t help with why the drivers don’t build downlevel, though I seem to recall that there was, at one time, some magic juju in the WDK build environment to prevent certain drivers from building in particular build environments because they used functions that were only available up-level, or they built with errors, or something.

I *can* tell you that building in an UPLEVEL build environment and running downlevel *IS* supported – I remember doing a presentation about how to do this and why you’d want to at WinHEC one year (it all seems so long ago). So, there should be no problem building for XP and running on a Win2K system. Of course, you can’t call any functions that were introduced in XP or later in your driver when it’s running on Win2K, so you need to dynamically determine the system on which your driver is running (IoIsWdmVersionAvailable or some such) and call the up-level functions via pointers (RtlGetSomethingOrOther).

Peter
OSR

>and why you’d want to at WinHEC one year (it all seems so long ago). So,
there

should be no problem building for XP and running on a Win2K system.

I remember some issues with __except_handler_3


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Mark Roddy wrote:

Interesting, however building for XP and running downlevel is
completely unsupported and if it works you are just lucky.

If you look into the 6001 Documentation, namely the “WDK Samples Index”,
under “Buses”, you’ll find that BulkUSB is supported for Win2000 up to
Vista (which is true), and that it also builds from Win2000 (which is
wrong).

It also states that it is not a PnP driver. (Funny, but it explains why
the PnP code looks a bit “tacked-on”.)

In fact the document “Installing or Updating the BulkUsb Driver” (linked
from the same WDK Samples Index) even states how to install it on Win98
(where it will definitely *not* run in its current form).

This also leaves unanswered the questions of why these drivers don’t
build for w2k

No secret here. Look in the makefile: the sample does only build if
“$(_NT_TARGET_VERSION)>=0x501”. And that’s WinXP.

So somebody deliberately put it here.
My guess as to the “why” is that some PowerManagement structures are
only defined on WinXP – there is no harm if they are compiled in the
driver file, because it is ensured that on W2K the code that uses them
will never be executed.
(See bulkusb.c and bulkpnp.c, look for deviceExtension->WdmVersion.)

Neverthelsee, IMHO in the BulkUSB makefile there should be some more
descriptive text.

and why there is simply no clue in the build output as to what went
wrong.

My guesses are: Overworked people, and/or people who don’t care, because
they are busy cranking out the next CD/DVD and/or the next new “sexy”,
hot technology.

(BTW, anybody else noticed that the “WDK_WS08RTM_DVD.iso” actually burns
comfortably on a CD? Nice!)

WDK 6000 has the same issue. If there is some secret incantation that
says ‘don’t build for w2k’ I’d like to know what that is.

See above. Took me half a day to find out what went wrong at the time,
that’s why I remember so vividly.

Yes, I burned my WDK 6001.18000 on a CD. I have not done any USB work since
Windows 2000 and have no idea what’s up.

“Hagen Patzke” wrote in message news:xxxxx@ntdev…
> Mark Roddy wrote:
>> Interesting, however building for XP and running downlevel is
>> completely unsupported and if it works you are just lucky.
>
> If you look into the 6001 Documentation, namely the “WDK Samples Index”,
> under “Buses”, you’ll find that BulkUSB is supported for Win2000 up to
> Vista (which is true), and that it also builds from Win2000 (which is
> wrong).
>
> It also states that it is not a PnP driver. (Funny, but it explains why
> the PnP code looks a bit “tacked-on”.)
>
> In fact the document “Installing or Updating the BulkUsb Driver” (linked
> from the same WDK Samples Index) even states how to install it on Win98
> (where it will definitely not run in its current form).
>
>> This also leaves unanswered the questions of why these drivers don’t
>> build for w2k
>
> No secret here. Look in the makefile: the sample does only build if
> “$(_NT_TARGET_VERSION)>=0x501”. And that’s WinXP.
>
> So somebody deliberately put it here.
> My guess as to the “why” is that some PowerManagement structures are only
> defined on WinXP – there is no harm if they are compiled in the driver
> file, because it is ensured that on W2K the code that uses them will never
> be executed.
> (See bulkusb.c and bulkpnp.c, look for deviceExtension->WdmVersion.)
>
> Neverthelsee, IMHO in the BulkUSB makefile there should be some more
> descriptive text.
>
>> and why there is simply no clue in the build output as to what went
>> wrong.
>
> My guesses are: Overworked people, and/or people who don’t care, because
> they are busy cranking out the next CD/DVD and/or the next new “sexy”,
> hot technology.
>
> (BTW, anybody else noticed that the “WDK_WS08RTM_DVD.iso” actually burns
> comfortably on a CD? Nice!)
>
>> WDK 6000 has the same issue. If there is some secret incantation that
>> says ‘don’t build for w2k’ I’d like to know what that is.
>
> See above. Took me half a day to find out what went wrong at the time,
> that’s why I remember so vividly.
>

> (BTW, anybody else noticed that the “WDK_WS08RTM_DVD.iso” actually burns

comfortably on a CD? Nice!)

Why is this nice? :slight_smile:

CD media is obsolele for files (only needed for audio for some El Cheapo car
audio systems).

Reason: DVD is faster, DVD±R can be written at 20MB/s, while CD only at
1.7MB/s.

I do not use CD media for any files for about 1.5 years, even if the file set
size is < 700MB.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Maxim S. Shatskih wrote:

I do not use CD media for any files for about 1.5 years, even if the
file set size is < 700MB.

After five years of storage - under good storage conditions - I lost
several CDs worth of backup data. Both on audio and data CDs, using
“brand” CD writers and “brand” CD blanks, also making several copies
using blanks from different vendors.

Since having been bitten by this, I am happy to go with the lowest
possible data density on the most mature technology fit for the task -
CD in this case.

And for you, I’d kindly suggest you test your old written DVD media. If
you have access to professional CD/DVD check systems (which I assume),
you now might want to start monitoring them for soft/hard error development.

Yes, I do not use optical media for archival at all, only to carry data
from one computer to another and to burn the distro CDs from MSDN-downloaded
ISOs.

Blank quality is really crucial.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Hagen Patzke” wrote in message news:xxxxx@ntdev…
> Maxim S. Shatskih wrote:
> > I do not use CD media for any files for about 1.5 years, even if the
> > file set size is < 700MB.
>
> After five years of storage - under good storage conditions - I lost
> several CDs worth of backup data. Both on audio and data CDs, using
> “brand” CD writers and “brand” CD blanks, also making several copies
> using blanks from different vendors.
>
> Since having been bitten by this, I am happy to go with the lowest
> possible data density on the most mature technology fit for the task -
> CD in this case.
>
> And for you, I’d kindly suggest you test your old written DVD media. If
> you have access to professional CD/DVD check systems (which I assume),
> you now might want to start monitoring them for soft/hard error development.
>
>
>