WinUSB++, wrapping WinUSB

WinUSB is an attempt from Microsoft to ease USB applications on Windows XP and above.  Though it’s been around for quite a while, and seemingly MS has done a good job, I haven’t seen it widely used. I am guessing it’s attributed to the fact that many proprietary home-made drivers already existed and worked fine before it’s even developed. Vista’s marketing failure to rule out XP is another factor that people has no stimulation to develop new drivers based on WinUSB just because it’s new.

However, with the imminent Win 7 and 64-bit era, many existing XP-base driver may have to be upgraded, ant chances are more WinUSB based drivers will appear.

A few months ago, with some ST7 based devices at hands,  I spent some spare time investigating WinUSB and having ported from the ST USB Driver for Tube device v2.0.3.

In my rough test, WinUSB is a little bit slower that STTub,  some similar transaction cost about 0.36s with  STTub, but 0.40s with WinUSB. Not quite surprising as WinUSB is more generic.

The other day, when I was cleaning up the PC, I found this earlier attempts being covered with dust. I was feeling like sharing it out would be nicer.

In the future,  I’ll being finding some time and talking about how to

1) wrap this C style API thing into a C++ interface and

2) overcome its major limits – no asynchronous access to this drive, which means if you have two WinUSB based application, you cannot let them talk to WinUSB at the same time.

 

2009-06-13_110956

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: