🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: I don't get DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE

#278
From: Peter Stefanos
Date: Mon, 26 May 2008 22:20
35 lines
2122 bytes
Hans Galema wrote:
> Peter Stefanos wrote:
> 
>> I have been unsuccessfully trying to get DBT_DEVICEARRIVAL and 
>> DBT_DEVICEREMOVECOMPLETE when listening to WM_DEVICECHANGE messages 
>> when I plug and unplug my USB device. 
> 
> Do you get any WM_DEVICECHANGE message?

Yes. I get 2 WM_DEVICECHANGE messages when I plug in my USB device and 1 
WM_DEVICECHANGE message when I unplug it. i.e.

<plug my USB to serial device in>
WM_DEVICECHANGE, WParam = 537, LParam = 7
WM_DEVICECHANGE, WParam = 537, LParam = 7

<unplug my USB to serial device>
WM_DEVICECHANGE, WParam = 537, LParam = 7


For the commercial (ATEN) USB to serial device, I get 3 WM_DEVICECHANGE 
messeges when I plug it in and 2 WM_DEVICECHANGE messsages when I unplug 
it. i.e.

<plug ATEN USB to serial device in>
WM_DEVICECHANGE, WParam = 537, LParam = 7
WM_DEVICECHANGE, WParam = 537, LParam = 32768
WM_DEVICECHANGE, WParam = 537, LParam = 7

<unplug ATEN USB to serial device>
WM_DEVICECHANGE, WParam = 537, LParam = 7
WM_DEVICECHANGE, WParam = 537, LParam = 32772

Kind Regards,
Peter.
Technical Details
Message-ID: <483b37ab$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <483a0f9d$1@newsgroups.borland.com> <483b1656@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1115be856d123060
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 27 May 2008 08:20:33 +1000
From: Peter Stefanos <peterATpennywiseDOTcomDOTau>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: I don't get DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE
References: <483a0f9d$1@newsgroups.borland.com> <483b1656@newsgroups.borland.com>
In-Reply-To: <483b1656@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 202.45.113.90
Message-ID: <483b37ab$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1211840427 202.45.113.90 (26 May 2008 15:20:27 -0700)
Lines: 36
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail