SetupDiOpenDeviceInfo - adding devices based on wildcard chars

Hi,

I'm trying to add device instances to a DeviceInfoSet using 
SetupDiOpenDeviceInfo(), but the DeviceInstanceId parameter is not accepting 
any wildcard characters in it. For example, I want to add all device 
instances with "USB\\MyVendorID\\*" or "USB\\MyVendorID\\0000" if 0000 could 
match anything perhaps, but the call fails with ERROR_NO_SUCH_DEVINST. 

My question is, how do I add all devices belonging to the logical group 
"USB\\MyVendorID" to the DeviceInfoSet?

TIA,
JY
0
Utf
3/3/2010 1:49:01 PM
development.device.drivers 941 articles. 0 followers. Follow

3 Replies
1358 Views

Similar Articles

[PageSpeed] 41

you need to wake the tree and look at each devnode to find a match.  look at 
the devcon sample which does its own wild card matching

d

-- 

This posting is provided "AS IS" with no warranties, and confers no rights.


"JY" <JY@discussions.microsoft.com> wrote in message 
news:93A3E688-FD90-4371-A1CB-A2282AB7AF3A@microsoft.com...
> Hi,
>
> I'm trying to add device instances to a DeviceInfoSet using
> SetupDiOpenDeviceInfo(), but the DeviceInstanceId parameter is not 
> accepting
> any wildcard characters in it. For example, I want to add all device
> instances with "USB\\MyVendorID\\*" or "USB\\MyVendorID\\0000" if 0000 
> could
> match anything perhaps, but the call fails with ERROR_NO_SUCH_DEVINST.
>
> My question is, how do I add all devices belonging to the logical group
> "USB\\MyVendorID" to the DeviceInfoSet?
>
> TIA,
> JY 

0
Doron
3/3/2010 11:28:46 PM
> you need to wake the tree and look at each devnode to find a match. =20

"To wake"? or "to walk"?

:-)

--=20
Maxim S. Shatskih
Windows DDK MVP
maxim@storagecraft.com
http://www.storagecraft.com

0
Maxim
3/4/2010 7:12:36 AM
walk

-- 

This posting is provided "AS IS" with no warranties, and confers no rights.


"Maxim S. Shatskih" <maxim@storagecraft.com.no.spam> wrote in message 
news:e9vMTo2uKHA.3408@TK2MSFTNGP06.phx.gbl...
>> you need to wake the tree and look at each devnode to find a match.
>
> "To wake"? or "to walk"?
>
> :-)
>
> -- 
> Maxim S. Shatskih
> Windows DDK MVP
> maxim@storagecraft.com
> http://www.storagecraft.com
> 
0
Doron
3/4/2010 5:51:29 PM
Reply:

Similar Artilces:

Adding a calculated ROW to a pivot table
Does anybody know how to add a calculated ROW to a pivot table? I have a pivot table that is returning totals at the bottom, as it should, but I *also* need it to return that total as a percentage of grand total, directly beneath the total. I've always done this free-form in the cells below a pivot table before, but the size of this pivot is dynamic so that's not an option. Also--I'm using the pivot in Access, not Excel directly. Anybody have any tips? Thanks! ...

Subject based filtering of DSN messages
I can't make this work for the vast majority of the DSN messages we get (message undeliverable and such). I have setup rules to filter the different bounce messages that I see in subject lines and some of them work fine. Most do not. The messages the come from postfix (for instance) have mime-encoded notification messages, split in several parts. I've tried matching the Subject: line I end up seeing in Outlook and the subject line that is in the internet headers of the message, which is not what outlook shows me. I think exchange 2003 is recognizing these messages and try...

Adding functionality to MS Outlook Express
Hi, I am looking for help to integrate anti-spam open source programs with MS Outlook Express :- - SpamPal - http://www.spampal.org/ - Spamato - http://www.spamato.net/ The problem is to provide a library that will facilitate this. I have read the MSDN Messaging and Collaboration documentation which gives the ability to get notifications of new messages and to access message folders :- http://msdn2.microsoft.com/en-gb/library/ms709546.aspx The next need is to add a toolbar (with buttons for SPAM/NOSPAM) and to detect what messages are selected in the message window. The MSOE...

Adding company name to the "From" field
Hopefully this is an easy problem. We are running Exchange 2003 on Windows Server 2003 in a mixed domain. (Win2k and Win2003 servers) Lets say I am working for a company named "XYZ". The owner of the company wants the "from" line in the email client to say "Bill Smith, XYZ Company". Unfortunately I can not find a way to do this. Any help is appreciated. Bob Hi Bob, Just use ADModify to rewrite the Display name for every user in your company, or for users of that company (if companys are sharing and AD) ADModify can be found here: http://www.gotdotnet.co...

Windows cannot access the specified device, path or file...
My buddy sent me a little file, 1.25mb, and I cannot open it. He can but I cannot. I get "Windows cannot access the specified device, path or file. You may not have the approiate permissions to access the item". XP Pro. Retail version. Have disk. This is my home computer. No administrator rights needed. No password needed. I'm the only one in the house. Computer in my name. No other users. What's up. Joe T. wrote: > My buddy sent me a little file, 1.25mb, and I cannot open it. He > can but I cannot. I get "Windows cannot access the specified > de...

How can I transfer emails in a Mailbox folder to a USB device?
I have a large number of emails saved in a folder in my Mail box. Some of the emails have files attached, and some do not. I want to save all the emails (including the attachments) to a USB device. You cannot, assuming you are referring to Outlook you can only copy the data file in its entirety, which can then only be accessed within Outlook. You could save the emails as eml files and save the attachments seperately "Harrinton" <Harrinton@discussions.microsoft.com> wrote in message news:F90EC062-4359-42E9-96FD-F88EA6536F09@microsoft.com... > I have a large numb...

cell to have comma-delimited values based on text
I have a table called "220_reference" with a column name "Part Number" having a sample value of below: 4047122(All Dash no.), 4057222(All Dash no.), 4058222(All Dash no.), 4060122(All Dash no.) The entire value is in one cell representing the "Part Number" column(defined as general type so text I suppose). Simple enough. But what I need to do is take any number that has "(All Dash no.)" after it and search through a column in another table to retrieve any rows that have that number(text) in it. The other table name is "220" with ...

ActiveX control being added to outgoing e-mail?
I have a user running Outlook 2003 via Exchange 2000. All outgoing messages sent by his system apparently have an ActiveX control in them. Any messages I try to open on another machine give the alert "Your current Security settings prohibit running ActiveX controls..." Could this mean the user has a virus? Something else? Any help is appreciated, and a direct reply to me is appreciated as well. Thanks, John M John discovered this was due to bad signature or stationary files in Outlook. I had the same problem with a user and tested this theory. There was indeed some c...

MSN Messenger 4: Forwarding Messages to Mobile Device?
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3170242457_31400555 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit Am I misunderstanding MSN�s mobile device feature? Under the Mobile Preferences, it says �Set up or edit account so my contacts can send messages to my mobile device�. So I�ve set my account up...but how is it activated? I thought it would work like AIM�s forward to mobile device feature. --B_3170242457_31400555 Content-type: text/html; ch...

USB KVM's always plays 'Device Connect' sound
It appears that USB KVM's with Audio support always make Windows XP computers play the 'Device Connect' sound when you switch between computers. Does anyone know of a USB KVM with Audio that can properly emulate the USB connection to the inactive computer, so that the 'device connect' event doesn't occur when switching between computers? <prubin@equilter.com> wrote in message news:293fbb08-74eb-4b65-8807-1c43540b4c88@o10g2000yqa.googlegroups.com... > It appears that USB KVM's with Audio support always make Windows XP > computers play the &...

Problem with AD-users
Hi, Ive done big mis-deleting. Ive tried to do one new DL-object for exchange. Its usually placed under users-coNtainer. The Distribution List I made, was false, so I had to be delete it. But, somehow Ive deleted a lot of objects from users-container! There did not existed many users they are in separate containers, but some were like administrator! I thin, it isnt possible to delete admin-account. The account still exist, but I think its properties arent now OK. I cannot add administrator account for administrator or any mailbox. Exchange system tool wont regocnize ay useraccounts. B...

sum items in a table based on description
I am interested in summing items is a table based on their description. Is there a formula that will add items together from column based on the contents in another cell reference in the same row? I know a pivot table will do this with some restrictions in the table design. You can use sumif if there is onbly one condition Assume you want to sum values in column C where column B is "x" =SUMIF(B2:B500,"x",C2:C500) Regards, Peo Sjoblom "Hrider" <hrider@yahoo.com> wrote in message news:ejggYE$MFHA.3328@TK2MSFTNGP14.phx.gbl... >I am interested ...

Receive PO based on amount.
Greetings GPLings.. :) Is there any way to receive with invoice , a PO that contain service /non inventoried items based on the amount? Eg: PO amount $100000000 for ONE service item and i would want to receive and invoice only $ 200. The reason i used this huge amount as PO is that even if i used a decimal value to receive the PO as a percentage,it will still not be accurate as GP allows only 5 decimal places. In a simple form, i want to receive based on the amount rather than qty. Cheers.. The only way to do that is to enter the PO for a quantity of 100,000,000 at a unit...

Join based on next closest value (like Excel VLOOKUP)
Trying to do something similar to a VLOOKUP (Excel) in an Access 2003 query. I have the following tables: JOBS Job,Quantity A,96 B,256 C,300 D,4299 COSTS Quantity,Cost 0, $1000 100, $1200 200, $1500 300, $2000 400, $2500 500, $3000 I need a query that takes JOBS.Quantity, looks it up in COSTS.Quantity and find the cost for the NEXT LOWEST quantity. (Example: Job B has a quantity of 256 and the next LOWEST quantity from COSTS is 200 so Job B costs $1500.) The results should be as follows: JOBS.Job,COSTS.Cost A,$1000 B,$1500 C,$2000 D,$3000 This would be ...

Home based Job For Indian
Want the pleasure of life, don't worry, work 1-2hours/day and earn Rs. 10,000-15,000/month online from your home/cafe/office PC. For details write # ejob1189@rediffmail.com Please write the subject of mail as: "Job Inquiry" ...

Fast alternative to table based state transition matrix
I got this answer from comp.theory. It was completely obvious once it was explained. It is trivially simple to create a DFA based recognizer without a state transition matrix data table. Simply encode case statements corresponding to inputs within the case elements of a case statement corresponding to states. In at least some cases the (case within case) method might be faster depending upon whether or not memory is reduced enough to more than offset the higher case statement overhead to increase cache locality of reference. "Peter Olcott" <NoSpam@OCR4Screen.com...

Adding a Record
I have 2 Subforms on my Main form. Each Subform contains a combo box with drop-down list. Their tables are on the many side of the one-to-many relationship with the Main form. When I make a selection on Subform 1, Subform 2 automatically populates with a correlated item from its drop-down list. PROBLEM: when I make a SECOND selection on Subform 1, the item that was listed on Subform 2 gets replaced with the item correlating with the SECOND selection. How can I adjust my code so that the second item is ADDED to the list on Subform 2 instead of replacing the first item? A sample of...

Deleting a row when adding a new row -
I have a spreadsheet that contains 100 rows. I want to limit the number of rows to 100. I.e. if the user adds a row (i.e. row 101) then all data from row 1 is deleted. I do not have to worry about the deleted data as it is updated in the new row! Can anybody help. I think you're saying you want the first row to be automatically deleted when a row is added at the end of the table. The row will have to be deleted, it won't happen automatically. The macro language is there for such specific requirements. -- Regards from Virginia Beach, Earl Kiosterud www.smokeylake.com -------------...

Adding a menu
Hello, How do I add a new menu (not a sub-menu) to the menu bar using a macro in Excel 97? Thank you. Eric. Try this http://www.erlandsendata.no/english/index.php?d=envbacbmenuxl97 "Eric" <eric@mail.com> wrote in message news:uGVq7is3DHA.1760@TK2MSFTNGP10.phx.gbl... > Hello, > > How do I add a new menu (not a sub-menu) to the menu bar using a macro in > Excel 97? > > Thank you. > > Eric. > > Thank you. Eric. "Township of East Hanover" <someone@somewhere.com> wrote in message news:ofCdnczcvKAtppHdRVn-jw@garden.net... &...

"One or more of the selected senders could not be added to your blocked senders list"
Hey all. I get this when ever I try to killfile anyone at all, regardless of who they are. I'm on OE6 in XP Home and this has only just started happening. My KF only has a few spammers in it so I don't think it's full. Does anyone know what's going on? Thanks Ayatollah of rock 'n' roller wrote: > Hey all. I get this when ever I try to killfile anyone at all, regardless of > who they are. I'm on OE6 in XP Home and this has only just started > happening. My KF only has a few spammers in it so I don't think it's full. > Does anyone...

Colouring Emails based on Headers
I am trying to use colour to pick out spam identified by a Spam program in an X-Header. I have gone into the advanced settings, but can't seem to find an option to colour based on content of the headers. Can anyone help me out here? SB Take a look at HeaderToCategory for MS Exchange 2000/2003 application: http://www.ivasoft.biz/hc.shtml It could help in that case. -- Rregards, Victor Ivanidze, software developer > I am trying to use colour to pick out spam identified by a Spam program in > an X-Header. > I have gone into the advanced settings, but can't seem to fin...

Payroll deduction based on percentage of another deduction
Is it possible to set up a payroll deduction based on percentage of another deduction? I see we can base a deduction on selected paycodes but not deductions. We can collect a percentage of wage attachments as collection fees but if the wage attachment deduction amount changes each pay, we'd have to manually change to collection fee code each pay. I'm looking for a way to calculate this collection fee automatically. ...

Outlook 2003
I have four different accounts setup in Outlook. I know that it is possible to use a default signature for new messages and replies with each account. However, when selecting New to start a new message, naturally, it uses the default mail account and inserts the corresponding signature. However, when changing the sent from account in the Accounts drop down, one would expect the "default" signature to be used; i.e. Outlook would delete the signature that it initially inserted and replace it with the default signature for the selected account. This is not what happens. Seemingly, ...

Row highlight based on the 1-31 day of the month
I've got a table with dates displayed in the first column (ascending order). I would like to highlight each row based on the day of the month with one of 5 chosen colours (red, yellow, green, blue and orange). rows with the 1st of the month: red rows with the 2nd of the month: yellow ....... rows with the 6th of the month: red ....... Julian. You would use conditional formatting to display different colors based upon the day value. Your conditional formatting formula would look at the day value of the date. You will have multiple conditions for each row. Condition 1 Formula is: ...

query based distribution group
Hello all running Exchange 2007 sp2, I need to modify an existing query based DL so it finds mailboxes and if the account has two different email address stamped on it. For example if the mailbox has test1.com and test2.com and it's a mailbox then make it a member of the query based DL Thanks for any help If it has those two e-mail addresses? That should return just one recipient. Or do you mean a recipient with any two proxy addresses? I don't believe that's possible with LDAP. Or do you mean a mailbox-enabled user with proxy addresses in two domai...