PC Review


Reply
Thread Tools Rate Thread

COM, LPT and USB to C, C++ Interface.

 
 
=?Utf-8?B?YXJub2xk?=
Guest
Posts: n/a
 
      1st Apr 2005
hi, I didn't write programs for more then 20 years. So I got some
truble wenn I started again.
Can somebody help me ?

How do I interface a COM, LPT oder USB I/O with C, C++.
Thank you very much.
regards
arnold
 
Reply With Quote
 
 
 
 
Dick Grier
Guest
Posts: n/a
 
      1st Apr 2005
Hi,

These all have separate answers. And, if you are interested in C/C++, you
posted in the wrong newsgroup (this is a Visual Studio .NET newsgroup).

Serial communications uses either a serial comms add-on (there are lots of
these around, many of them free). For example, downloads from my homepage,
and code in my book (below)

Parallel comms requires a device driver. I have a .NET control that wraps
such a driver on my homepage (see IONet).

Here is my USB FAQ:


You normally use whatever API is required for the specific hardware device
that is attached to the USB port. There is no general-purpose driver for
this. So, if you are connecting to a serial device, you use the Windows
serial APIs. If a sound device, you use the MCI APIs. If a disk drive, you
use the various file APIs. The actual driver that is installed when Windows
detects the USB device translates these Windows APIs to the device specific
commands required for the actual hardware.

However, if you have custom built USB hardware, you need lower level access
to the device. You must know A LOT about the hardware before this sort of
thing is useful. I suggest that you get a copy of Jan Axelson's book, USB
Complete, 2nd Edition. You can get information on it from the Books link on
my homepage.

If you just want to use a USB serial port adapter to connect to an RS-232
device, then you may use MSComm or any of the other serial communications
methods that are described in detail in my book.

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert user interface of 2007 to the old 2003 or XP interface? Bibico Microsoft Word Document Management 2 15th Dec 2008 06:34 AM
'IWebPartField.GetFieldValue' in explicit interface declaration is not a member of interface rote Microsoft ASP .NET 0 30th Oct 2008 07:36 AM
Smart Pointers (SQLDMO): Acquiring SQLServer2 interface from SQLServer interface? Mark Findlay Microsoft Dot NET 1 23rd Dec 2005 10:08 AM
.net COM interface: how to interface a fuction returning array learner Microsoft VB .NET 0 3rd Oct 2005 03:55 AM
Reflection: CreateInstance(Type) of class that supports known interface - Get actual interface reference to object? Chris Morse Microsoft VB .NET 10 16th Jan 2004 01:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:23 PM.