DeviceIoControl & USB using Managed C++ & C#

Introduction

Low level I/O is not part of the .NET framework, so information on how its done is difficult to find.  Since I am using some specialized hardware, which won't be available to most C# developers, my comments will focus on interoperability with unmanaged code.  If you happen to have the Cypress EZ-USB FX development board, you can use the code given here as a starting point.  Otherwise you can use it as a source of ideas.

Find the code at my website.

This code is my early attempt to produce a wrapper to allow .NET applications to use the device driver that comes with the Cypress development board, and is far from being complete.  As it turns out I may never complete this project.  I have purchased DriverX USB from Tetradyne.  The data acquisition system that I am working on uses a custom ISA card.  Originally I started with MSDOS, then moved to Win 95.  With MSDOS & Win 95, I could just use in & out instructions to talk directly to the hardware.  When I moved to NT 4, I purchased DriverX, which eliminated the need to write a device driver for communicating with the ISA card.  Now the data acquisition system is running on Win 2000 and XP.  The problem is that as we deploy more sites, it is getting difficult to purchase systems with ISA slots.  To eliminate the dependency on the ISA card we are moving to USB.  In the electronics crate for the data acquisition system a Cypress EZ-USB FX chip will be used.

If you want me to post articles about using DriverX, DriverX USB, and wrapping my legacy C++ code using managed C++, send me a message at [email protected]. My .NET reference books for this project are:

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor