Article View: borland.public.cppbuilder.nativeapi
Article #1904Re: USB Device Detection
From: Mike Collins
Date: Fri, 01 Jun 2007 14:01
Date: Fri, 01 Jun 2007 14:01
34 lines
2265 bytes
2265 bytes
Don't know if it will help but you can use RegisterDeviceNotification (...) win32 API to register with the system, and thus be informed of such updates as a USB device being inserted or removed. HTH Mike <Anthony> wrote in message news:vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com... > > Hello all, > > I have an interesting problem, which I think the solution may be a bit > above my knowledge level but I think is completely doable. > > The question is: How do I go about programmatically initiating the USB > hardware detection sequence? > > I have a competer system with an internal USB connection to a > removable device. The problem that I am having is that when I plug in > the devices I have to unplug and plug in the USB cable to initiate the > USB hardware detection routine so that the device can be accessed by > the OS. I would really like to get away from the unplug/plug step and > was thinking I should be able to do it programmatically with a small > program. I just don't know how and thought I would inquire here with > the experts. > > Any suggestions that you have would be greatly appreciated, especially > code snippets since this may be more on the driver level that I have > worked with before. > > Thank you all for your time, > Anthony
Technical Details
Message-ID:
<4660167f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,487f80d121183d21 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Mike Collins" <its@TheBottomOfThePost> Newsgroups: borland.public.cppbuilder.nativeapi References: <vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com> Subject: Re: USB Device Detection Date: Fri, 1 Jun 2007 14:01:36 -0000 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.3959 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3959 NNTP-Posting-Host: 89.240.182.116 Message-ID: <4660167f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1180702335 89.240.182.116 (1 Jun 2007 05:52:15 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail