Security and Privacy on the U3 Platform

Be Smart with U3

Programming Custom Hardware for Windows – Points of Interest

Points of Interest

  • Short is a 16-bit integer in Win32 C++ whereas int is 32-bit integer in Win32 C++ use (short) to force returning 16-bit integer back to VB. So as you’ll notice in the function InPort and OutPort I’ve used this convention.
  • There exist similar functions to _inp( ) and _outp( ) that have capacity to read words and double words from the specified port. Maybe if you’re writing an I/O intensive application, for instance, a Data Acquisition card you might consider using them by changing the code in DLL appropriately.
  • If direct I/O is not achieved through the giveio driver there are other system APIs that’ll allow you to do so but the process becomes very slow (approximately 20 times) so it’s worth considering the use of GiveIO driver.
The VB Client Program
The sample program to use this DLL is developed using Visual Basic 6.0 and with a quick look at the source you’ll know how can you perform I/O using this DLL. You’ll see the exports InPort, OutPort, GetDriverStatus, and GetDLLStatus in action with their usage.
So finally we’ve developed a library that’ll ease development of hardware accessing applications in VB and other RAD application development tools that may consume a DLL. I would not say that it’s the most efficient way but certainly the most straightforward to understand and implement. Any comments and suggestions can be forwarded to me at .
  1. Direct Port I/O and Windows NT by Dale Roberts(
  2. LoadDrv program and source code by Paula Tomlinson

November 11, 2006 - Posted by | Uncategorized

No comments yet.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: