Windows XP Community - XPHeads



Device attach

microsoft.public.windowsxp.embedded


Reply
  #1 (permalink)  
Old 06-12-2008, 03:23 PM
Rob
 
Posts: n/a
Device attach
Hi,
I am trying to dectect insertion/removal of devices under XP.
I read : http://www.codeproject.com/KB/system...splay=PrintAll

Things like : DBT_DEVTYP_PORT are NOT received when I plugin my serial2USB
device (a CDC device, having the comport class GUID) Only device-interface
notifications are received.

The dbcc_classguid which is received in my DEV_BROADCAST_DEVICEINTERFACE is
a class-guid (I think), so it does not refer to a specific device. (when I
pugin my keyboard I get a HIDCLASS guid).

I need to know what type of device I plugin, and it's devicename (COM1:, or
KBD1
I tested a lot and did not succeed yet.
Nothing in the Device Management Functions seems to be able to get this
information. The classguid on it's own is too little info I think (2
keyboards would have the same CLASSGUID). What am I missing here ?

Greetings,
Rob.
















Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-12-2008, 10:15 PM
Rob
 
Posts: n/a
RE: Device attach
Hi,
I found this : http://69.10.233.10/KB/cs/HardwareHelper.aspx
This article basically concludes that it's impossible to know which device
was added in a direct way, but you need to monitor the entire device-list for
changes.
I can hardly believe this :-( , this calls for an API extension IMHO.
The WinCE implementations is so simpel.....

But, accepting the above, let me simplify the question :

Suppose I have determined which device changed .
(I can get things like DEVDETAIL structure for it)
Where can I find the devicename ? (like COM1

In one sample I found the device is opened using a long string from
devdetail called "devicepath". But this looks quite differrent,It has PID and
VID and a GUID in it. Thats not what I'm looking for, just the short
devicename. (COM1,KBD1 etc)

Any suggestions ?
I need the INTERFACE_GUID (not the class_GUID) and the devicename.
note this will be written in C++.

Greetings,
Rob.





















"Rob" wrote:

> Hi,
> I am trying to dectect insertion/removal of devices under XP.
> I read : http://www.codeproject.com/KB/system...splay=PrintAll
>
> Things like : DBT_DEVTYP_PORT are NOT received when I plugin my serial2USB
> device (a CDC device, having the comport class GUID) Only device-interface
> notifications are received.
>
> The dbcc_classguid which is received in my DEV_BROADCAST_DEVICEINTERFACE is
> a class-guid (I think), so it does not refer to a specific device. (when I
> pugin my keyboard I get a HIDCLASS guid).
>
> I need to know what type of device I plugin, and it's devicename (COM1:, or
> KBD1
> I tested a lot and did not succeed yet.
> Nothing in the Device Management Functions seems to be able to get this
> information. The classguid on it's own is too little info I think (2
> keyboards would have the same CLASSGUID). What am I missing here ?
>
> Greetings,
> Rob.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:05 PM.








Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74