Describing a Resource for the Registry

The system registry contains resource-related data. This data is located under the following registry key and is kept in a special registry data type named REG_RESOURCE_LIST. Applications can obtain the resource-related data through the System Registry provider. You can add and modify system resources in the registry.

HKEY_LOCAL_MACHINE
   Hardware
      ResourceMap

The following procedure describes how to store resource-related information in the system registry.

To store resource-related information in the system registry

  1. Create a string that contains the following fields.

    Field Contains
    Interface type One of the following values:
    Internal
    Isa
    Eisa
    MicroChannel
    TurboChannel
    PCIBus
    VMEBus
    NuBus
    PCMCIABus
    CBus
    MPIBus
    MPSABus
    Bus number Integer specifying the bus number.
    Partial descriptor number Integer specifying the descriptor number.
    Offset or union type One of the following values:
    Port.Start
    Port.PhysicalAddress
    Port.Length
    Interrupt.Level
    Interrupt.Vector
    Interrupt.Affinity
    Memory.Start
    Memory.PhysicalAddress
    Memory.Length
    Dma.Channel
    Dma.Port
    Dma.Reserved1
    DeviceSpecificData.DataSize
    DeviceSpecificData.Reserved1
    DeviceSpecificData.Reserved2
  2. Place the string in the appropriate key under the registry key.

    HKEY_LOCAL_MACHINE
       Hardware
          ResourceMap
    

The following code example describes a valid resource descriptor.

local|hkey_local_machine\hardware\resourcemap\
  hardware abstraction layer\
  pc compatible eisa/isa HAL|.raw("eisa",0,0,"interrupt.affinity")

The following code example shows valid MOF syntax for retrieving a resource descriptor.

[DYNPROPS] 
class MyRegProp
{    
   [KEY]  
   STRING MyKey; 
   STRING MyReservedTranslated;
};

[DYNPROPS] 
instance of MyRegProp
{
   MyKey = "1";
   [PropertyContext("local|hkey_local_Machine\\hardware\\ResourceMap\\
                   System Resources\\Reserved|.Translated
                   (\"Internal\")(0)(1)(\"Memory.PhysicalAddress\")"),
   Dynamic, Provider("RegPropProv")] 
   MyReservedTranslated;
};