🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: OnDeviceChange Problem

#3133
From: Bob Gonder
Date: Tue, 17 Oct 2006 16:08
25 lines
1645 bytes
Uri wrote:

>I tried that, it's not working, every time when the function is
>call (when I connect or remove the USB device from the PC) the
>parameter 'm.WParam' stay 7 (m.WParam = 7) Why does it not chaning?

Look in DBT.H
7 is DBT_DEVNODES_CHANGED which you should be ignoring as Michel
pointed out.

>>switch(m.WParam)
>>{
>>   case DBT_DEVICEARRIVAL:
>>	//a new device has been inserted
>>   break;
>>   case DBT_DEVICEREMOVECOMPLETE:
>>	//a device has been removed
>>   break;
>>}
>>
>>Michel

Just a thought:
It could be that the mystery device you are unplugging isn't supposed
to report device arrival/removed. You might ask the manufacturer.
Technical Details
Message-ID: <d5v9j2trraqoc3hq326dl7brb1750gvcgo@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4534d31d$1@newsgroups.borland.com> <4534eac1$1@newsgroups.borland.com> <4534ec6f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a72a1c41eec7e70f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: OnDeviceChange Problem
Date: Tue, 17 Oct 2006 09:08:55 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <d5v9j2trraqoc3hq326dl7brb1750gvcgo@4ax.com>
References: <4534d31d$1@newsgroups.borland.com> <4534eac1$1@newsgroups.borland.com> <4534ec6f$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.106
X-Trace: newsgroups.borland.com 1161101333 69.69.90.106 (17 Oct 2006 09:08:53 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail