How to init HKEY_CURRENT_CONFIG registry key in INF file?

Discussion in 'Windows Vista Drivers' started by Cao.Andy, Jul 11, 2006.

  1. Cao.Andy

    Cao.Andy Guest

    Can I init HKEY_CURRENT_CONFIG(hardware profiles) in INF file? What's
    the abbreviation for
    HKEY_CURRENT_CONFIG in INF file?

    As I know, in INF file, HKCR is abbreviation for HKEY_CLASSES_ROOT, and
    HKLM is abbreviation for HKEY_LOCAL_MACHINE. Is there abbreviation for
    HKEY_CURRENT_CONFIG?
    (I call IoOpenDeviceRegistryKey in my driver initial routine with
    parameter 2 set to hardware profiles, the code is like:
    Status = IoOpenDeviceRegistryKey(pDevExt->PhyDevObj,

    PLUGPLAY_REGKEY_DEVICE|PLUGPLAY_REGKEY_CURRENT_HWPROFILE , KEY_READ,
    &hPDOKey);
    and I want to initial thease profiles when install device's driver)
     
    Cao.Andy, Jul 11, 2006
    #1
    1. Advertisements

  2. why do you need to access hw profiles (which are not really used anymore
    anyways)
     
    Doron Holan [MS], Jul 12, 2006
    #2
    1. Advertisements

  3. Cao.Andy

    Cao.Andy Guest

    so the "hw profiles" is obsolete, or useless? but I see some product
    save device config in it (hw profiles)
    There are two other way to save the device config in the registry:
    1. PLUGPLAY_REGKEY_DEVICE - "storing device-specific information"
    2. PLUGPLAY_REGKEY_DRIVER - "storing driver-specific
    information"(description in DDK doc)
    But I don't see any difference between them, both of them is unit place
    for each device. Is that right?
     
    Cao.Andy, Jul 13, 2006
    #3
  4. There are two other way to save the device config in the registry:
    PLUGPLAY_REGKEY_DRIVER is IIRC wiped on Update Driver, PLUGPLAY_REGKEY_DEVICE
    is not.

    PLUGPLAY_REGKEY_DRIVER is Control\Class\guid\%04d
    PLUGPLAY_REGKEY_DEVICE is Enum\bus\hardwareID\instanceID\Device Parameters
     
    Maxim S. Shatskih, Jul 13, 2006
    #4
  5. PLUGPLAY_REGKEY_DEVICE is primarily for PDO (enumerator) use. It exists
    before any driver is installed for the device. Though I'm not sure at which
    moment after QUERY_RELATIONS it exists.
    PLUGPLAY_REGKEY_DRIVER is for FDO (driver) use.
     
    Alexander Grigoriev, Jul 13, 2006
    #5
    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.