The acmDriverPriority function modifies the priority and state of an ACM driver.
MMRESULT acmDriverPriority(
HACMDRIVERID hadid,
DWORD dwPriority,
DWORD fdwPriority
);
Returns zero if successful or an error otherwise. Possible error values include the following:
Value | Description |
---|---|
MMSYSERR_ALLOCATED | The deferred broadcast lock is owned by a different task. |
MMSYSERR_INVALFLAG | At least one flag is invalid. |
MMSYSERR_INVALHANDLE | The specified handle is invalid. |
MMSYSERR_INVALPARAM | At least one parameter is invalid. |
MMSYSERR_NOTSUPPORTED | The requested operation is not supported for the specified driver. For example, local and notify driver identifiers do not support priorities (but can be enabled and disabled). If an application specifies a nonzero value for dwPriority for local and notify driver identifiers, this error will be returned. |
All driver identifiers can be enabled and disabled, including global, local and notification driver identifiers.
If more than one global driver identifier needs to be enabled, disabled or shifted in priority, an application should defer change notification broadcasts by using the ACM_DRIVERPRIORITYF_BEGIN flag. A single change notification will be broadcast when the ACM_DRIVERPRIORITYF_END flag is specified.
An application can use the function with the acmMetrics ACM_METRIC_DRIVER_PRIORITY metric index to retrieve the current priority of a global driver. Drivers are always enumerated from highest to lowest priority by the acmDriverEnum function.
All enabled driver identifiers will receive change notifications. An application can register a notification message by using the acmDriverAdd function in conjunction with the ACM_DRIVERADDF_NOTIFYHWND flag. Changes to nonglobal driver identifiers will not be broadcast.
Priorities are simply used for the search order when an application does not specify a driver. Boosting the priority of a driver will have no effect on the performance of a driver.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in msacm.h.
Import Library: Use msacm32.lib.
Audio Compression Manager Overview, Audio Compression Functions, acmMetrics, acmDriverEnum, acmDriverAdd