Re: WM_DEVICECHANGE PARAMETERS
- From: "Doron Holan [MSFT]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Jun 2008 13:42:24 -0700
yes, of course you can register for multiple notifications. for keyboards you should GUID_DEVINTERFACE_KEYBOARD, not the HID guid.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:0153784F-2B33-43C4-B915-C121014F7BE5@xxxxxxxxxxxxxxxx
Hi,
I need to monitor several types of devices at the same time :
- keyboard (not all HID's)
- Comports
- Disks
Can I register multiple times for this ?
Greetings,
Rob.
"Doron Holan [MSFT]" wrote:
you need to register with a specific device interface. this tells you the
type of device. once you have the devicce instance path on the arrival
notification you can use setupdi to open up the properties for the device
and read the "ComPort" property (for a COM port)
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A51D55EF-F958-40F2-920C-1AD0DB3D73A8@xxxxxxxxxxxxxxxx
> Hi,
> I also had the problem that LParam is 0.
> See codefragment below for the right (?) way to register, in order to
> solve
> that.
>
> My problem is that when I plug in a device (like a COMPORT) I would > like
> to
> know 2 things :
> 1) WHat kind of device was plugged (comport, I need the IF-GUID I > think)
> 2) What it's devicename is (Like COM1:)
>
> This seems impossible without to determine from the notification-info.
> See : http://69.10.233.10/KB/cs/HardwareHelper.aspx
> and : > http://www.codeproject.com/KB/system/HwDetect.aspx?display=PrintAll
>
> monitoring the entire devicelist seems the only option.
> I hope I'm wrong about this.
>
> Any tips ?
>
>
> //****** CODE fragment: ******
>
> DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
> GUID tmp={0,0,0,""};
> ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
>
> NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
> NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
> NotificationFilter.dbcc_classguid = tmp;
>
> m_hDevNotify = RegisterDeviceNotification(m_hWnd > ,&NotificationFilter,
> DEVICE_NOTIFY_WINDOW_HANDLE|DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
>
> //****** end CODE fragment: ******
>
>
>
> Greetings,
> Rob.
>
>
>
>
> "rseedle" wrote:
>
>> I am recieving the plug in / unplug events correctly but the WPARAM
>> always
>> has a 7 in it. If I understand correctly the WPARAM should specify the
>> values
>>
>> DBT_DEVICEARRIVAL 0x8000
>> and
>> DBT_DEVICEREMOVECOMPLETE 0x8004
>>
>> What is up with that ?
>>
>> Randy Seedle
.
- Follow-Ups:
- Re: WM_DEVICECHANGE PARAMETERS
- From: Rob
- Re: WM_DEVICECHANGE PARAMETERS
- References:
- RE: WM_DEVICECHANGE PARAMETERS
- From: Rob
- Re: WM_DEVICECHANGE PARAMETERS
- From: Doron Holan [MSFT]
- Re: WM_DEVICECHANGE PARAMETERS
- From: Rob
- RE: WM_DEVICECHANGE PARAMETERS
- Prev by Date: Re: WDFQUEUE's REQUIRE DISPATCH_LEVEL operation on X64/AMD64 platf
- Next by Date: Re: And another one, this time in Usbser.sys on XP
- Previous by thread: Re: WM_DEVICECHANGE PARAMETERS
- Next by thread: Re: WM_DEVICECHANGE PARAMETERS
- Index(es):
Relevant Pages
|