## Physical Device Driver Reference

[prev][next][parent][TOC]

### RMAllocResource - Remarks

Prior to making any attempt to access the resource, a driver must issue this call and successfully obtain ownership of a resource. This call includes non-destructive (read-type) accesses.

For I/O and BIOS memory resources, RMAllocResource searches to locate an available I/O or memory region that is supported. The resource to be allocated is described in a RESOURCESTRUCT, which contains a C-union of structures that are resource-type specific. This service returns a resource handle (HRESOURCE) that is used to identify usage of the resource by this driver.

Resources are initially assigned to the driver that is issuing the RMAllocResource request. By using hardware probing, the driver determines if the hardware it intends to support is installed.

When the driver determines that a supported adapter is present, it registers an adapter (RMCreateAdapter) and assigns resource handles by providing a list of resource handles in the RMCreateAdapter service request .

If an adapter is not found, resources that are not assigned to a device or adapter must be released. See RMDeAllocResource.