Whar are invalid characters in a hardware or compatible id?

Discussion in 'Windows Vista Drivers' started by Stefan Kuhr, Oct 24, 2006.

  1. Stefan Kuhr

    Stefan Kuhr Guest

    Hello everyone,

    I need to know an ASCII character that is definitely invalid in a
    hardware or compatible ID. Our software has to send the hardware IDs and
    compatible IDs of a Windows client via a Webservice interface across the
    wire. Somewhere in the remote logic a third party LDAP parser comes into
    play which is so buggy that it gets entirely confused by backslashes as
    they appear in hardware IDs or compatible IDs. So as a workaround I
    would like to replace all backslashes in the hardware IDs I find via
    setupapi and cfgmgr32 APIs with a surrogate character so the LDAP parser
    (hopefully) will work. When the result is then written into the database
    behind all the stuff, we would then dutifully convert all surrogate
    characters back into backslashes.

    I noticed that devcon uses the asterisk symbol ('*') as a wildcard
    character and that it uses the @ symbol to distinguish instance IDs from
    hardware or compatible IDs. Can I therefore safely assume that * and @
    are invalid characters in a hardware ID so I can safely use them as my
    surrogate character?

    Any help appreciated,
    Stefan Kuhr, Oct 24, 2006
    1. Advertisements

  2. looking up the document for IRP_MN_QUERY_ID gives you this information, did
    you even try to search this out onyour own?
    If a driver returns an ID with an illegal character, the system will bug
    check. Characters with the following values are illegal in an ID for this

    Less than 0x20 (' ')
    Greater than 0x7F
    Equal to 0x2C (',')


    Doron Holan [MS], Oct 25, 2006
    1. Advertisements

  3. Stefan Kuhr

    Stefan Kuhr Guest

    Hello Doron,

    Thanks, exactly what I was looking for. Yes I looked for it but probably
    did not use the proper search terms. I looked for "invalid character"
    and got tons of search hits. Maybe you are in an advantage because you
    have a-priori-knowledge about where to possibly find it and because you
    are probably a native speaker. Anyway, thanks for taking your time and
    helping me.
    Stefan Kuhr, Oct 25, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.