🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1909

Re: USB Device Detection

#1909
From: Maurice
Date: Sat, 02 Jun 2007 11:10
33 lines
2095 bytes
"AlexB" <b.a.v@inbox.ru> wrote in message 
news:465f9601$1@newsgroups.borland.com...
> Anthony wrote:
>
>> ...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.
> ...
>> Any suggestions ...
>
> You can use MS utility DevCon.exe.
> Example: restart all devices with VID=0x0547 and PID=0x2005
>
> devcon.exe restart "@USB\VID_0547&PID_2005\*"
>
> This utility is very useful when something goes wrong and you have to
> restart driver and start the enumeration without device unplugging.
>
> Do not forget to wait the end of work of the utility before continue
> (for example with WinExecAndWait32 by Peter Below). And some devices
> (based on Cypress chip) do enumeration twice so for them it is
> necessary to add an additional pause.
> -- 
> Alex.

where is devcon?, I don't find it in my system (WIN XP SP2)

thanks
Maurice
Technical Details
Message-ID: <4661503f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com> <465f9601$1@newsgroups.borland.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: "Maurice" <morisaab@yahoo.fr>
Newsgroups: borland.public.cppbuilder.nativeapi
References:  <vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com> <465f9601$1@newsgroups.borland.com>
Subject: Re: USB Device Detection
Date: Sat, 2 Jun 2007 14:10:43 +0300
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 213.175.188.190
Message-ID: <4661503f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1180782655 213.175.188.190 (2 Jun 2007 04:10:55 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail