Article View: borland.public.cppbuilder.nativeapi
Article #4749Re: Access a USB port from BCB
From: Oliver Rutsch
Date: Tue, 29 Nov 2005 07:37
Date: Tue, 29 Nov 2005 07:37
33 lines
2284 bytes
2284 bytes
Hi Bogdan, > Hello, > > I want to make an applicaton to connect two PCs via an USB cable. > As far as I read from the MSDN site, I can do this without having to > write a specific driver, because I already know what application is at No, you can't. It's a little bit more difficult than in the good old RS232 days. You need (1) a device, (2) a driver and (3) communication in your application to your driver. Have you ever wondered why there is a knot in USB-direct-link cables ;-) That's you're USB device you're talking to. Just a plain cable does exactly...nothing. > the other end of the connection, so I can use raw read/write directly > to the port(I guess using something like CreateFile/WriteFile...). You can't write directly to an USB port. You can communicate with an USB driver, not more. > Can anyone give me an idea on where to start, or some sample > code on how to do this. > USB Design by Example, John Hyde, Wiley Computer Publishing Programming the Windows Driver Model, Walter Oney, Microsoft Press But be warned: That's nothing you can do over a weekend. Why not using a crossed CAT5 cable and two NIC's? This is much easier as you can talk with TCP/IP between your applications. Thousands of good client/server components for TCP/IP are on the market (Indy components!). Bye, Oliver
Technical Details
Message-ID:
<438c057e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<438a207b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5d80b591ab92bd02 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 29 Nov 2005 08:37:58 +0100 From: Oliver Rutsch <orutsch@sympatec.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en, de-de MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Access a USB port from BCB References: <438a207b@newsgroups.borland.com> In-Reply-To: <438a207b@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 217.5.250.34 Message-ID: <438c057e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133249918 217.5.250.34 (28 Nov 2005 23:38:38 -0700) Lines: 33 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail