NTSTATUS
SoundReportResourceUsage(
IN PDEVICE_OBJECT DeviceObject,
IN INTERFACE_TYPE BusType,
IN ULONG BusNumber,
IN PULONG InterruptNumber OPTIONAL,
IN KINTERRUPT_MODE InterruptMode,
IN BOOLEAN InterruptShareDisposition,
IN PULONG DmaChannel OPTIONAL,
IN PULONG FirstIoPort OPTIONAL,
IN ULONG IoPortLength
);
The SoundReportResourceUsage function reserves hardware resources for use by the specified device or driver. This function does not allow reservation of resources already reserved for another device or driver.
Returns one of the following values.
Value |
Definition |
STATUS_SUCCESS |
Success. |
STATUS_DEVICE_CONFIGURATION_ERROR |
Resources already assigned. |
STATUS_INSUFFICIENT_RESOURCES |
Resources unavailable. |
Before attempting to access device hardware, call SoundReportResourceUsage to ensure the resources you intend to use are not already assigned to another device.
You can associate resources with either the driver object or with one of the device objects created by SoundCreateDevice. If the driver supports multiple cards, you must associate resources with device objects.
Each time you call SoundReportResourceUsage for a particular device object or driver object, you override the resource reservation made with any previous call for the same object.
Typically, a driver acquires resources for each device in turn, and then calls SoundReportResourceUsage a final time to declare (to the rest of the system) all the resources used by the card instance.
To free reserved resources, call SoundFreeDevice.