次の方法で共有


ConfigRsrc (Compact 2013)

3/26/2014

This function queries the device for resource requirements and adds this information to the appropriate PCI_RSRC structure resource list.

Syntax

static BOOL ConfigRsrc(
  PPCI_DEV_INFO pInfo,
  PPCI_RSRC pMemHead,
  PPCI_RSRC pIoHead,
  DWORD* pMemSize,
  DWORD* pIoSize 
);

Parameters

  • pMemHead
    [in, out] Pointer to an initialized memory PCI_RSRC structure on input. On output, a pointer to a memory PCI_RSRC structure.
  • pIoHead
    [in, out] On input, pointer to an initialized I/O PCI_RSRC structure. On output, a pointer to an I/O PCI_RSRC structure.
  • pMemSize
    [in] Pointer to a memory resource size accumulator.
  • pIoSize
    [in] Pointer to an I/O resource size accumulator.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

If the resource is in the PCI memory space, the resource information is added to the pMemHead list. If the resource is in the PCI I/O space, the resource information is added to the pIoHead list. The PCI bus driver relies on ConfigRsrc to provide information about all resources, including those usually handled by the PCI bus driver. For example, the base address registers found at offset 0x10 through 0x24 in the configuration space of a PCI device must be queried for validity and resource information. Gdcfg.c describes this process.

Requirements

Header

gdcfg.c

Library

Gdcfg.lib

See Also

Reference

Device Configuration Functions
PCI_DEV_INFO
PCI_RSRC