Microsoft KB Archive/311046

= INFO: Resolving STATUS_INVALID_OWNER from HalAssignSlotResources =

PSS ID Number: 311046

Article Last Modified on 10/20/2003

-

The information in this article applies to:


 * Microsoft Windows NT 4.0 Driver Development Kit (DDK), when used with:
 * the operating system: Microsoft Windows NT 4.0

-



This article was previously published under Q311046



SUMMARY
This article provides an overview of the HalAssignSlotResources function and the registry keys that are used to resolve a return value of STATUS_INVALID_OWNER.



MORE INFORMATION
HalAssignSlotResources is a function that is used by legacy drivers to assign resources to their devices.

Drivers should only need to call HalAssignSlotResources, which performs many significant checks on the passed-in resource list, to reserve device resources.

When a call is first made to HalAssignSlotResources to report a Peripheral Component Interconnect (PCI) device, this function attempts to create an entry under the registry key

HKEY_LOCAL_MACHINE\HARDWARE\OWNERMAP

that has the format of

PCI_X_Y: REG_SZ: \Device\ 

where X represents the PCI bus number and Y represents the slot number.

This PCI_X_Y entry will not be deleted by the system until the requested resources for this PCI bus and slot are released by a call to IoAssignResources with the RequestedResources parameter set to NULL. This is how drivers should release their PCI devices' resources when the driver is unloaded.

Before creating this registry key, HalAssignSlotResources conducts a &quot;valid owner&quot; check. If it encounters another PCI device that has the same bus and slot numbers as the one being reported (perhaps due to a driver improperly freeing previously reported resources) it returns a status of STATUS_INVALID_OWNER. This is the only cause for returning such a status.

If you encounter such an error, check the entries under the ownermap registry key for a PCI device that has the same bus and slot numbers as your device. To resolve this problem, make sure that resources are being properly freed.

