Skip to content

Latest commit

 

History

History
164 lines (135 loc) · 5.71 KB

nf-msacm-acmdriveradda.md

File metadata and controls

164 lines (135 loc) · 5.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msacm.acmDriverAddA
acmDriverAddA function (msacm.h)
The acmDriverAdd function adds a driver to the list of available ACM drivers. (acmDriverAddA)
acmDriverAddA
msacm/acmDriverAddA
multimedia\acmdriveradd.htm
Multimedia
f037cab8-a1f4-487f-ab0a-11e11993b007
12/05/2018
_win32_acmDriverAdd, acmDriverAdd, acmDriverAdd function [Windows Multimedia], acmDriverAddA, acmDriverAddW, msacm/acmDriverAdd, msacm/acmDriverAddA, msacm/acmDriverAddW, multimedia.acmdriveradd
msacm.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
acmDriverAddW (Unicode) and acmDriverAddA (ANSI)
Msacm32.lib
Msacm32.dll
Windows
19H1
acmDriverAddA
msacm/acmDriverAddA
c++
APIRef
kbSyntax
DllExport
Msacm32.dll
Ext-MS-Win-mm-msacm-l1-1-0.dll
acmDriverAdd
acmDriverAddA
acmDriverAddW

acmDriverAddA function

-description

The acmDriverAdd function adds a driver to the list of available ACM drivers. The driver type and location are dependent on the flags used to add ACM drivers. After a driver is successfully added, the driver entry function will receive ACM driver messages.

-parameters

-param phadid

Pointer to the buffer that receives a handle identifying the installed driver. This handle is used to identify the driver in calls to other ACM functions.

-param hinstModule

Handle to the instance of the module whose executable or dynamic-link library (DLL) contains the driver entry function.

-param lParam

Driver function address or a notification window handle, depending on the fdwAdd flags.

-param dwPriority

Window message to send for notification broadcasts. This parameter is used only with the ACM_DRIVERADDF_NOTIFYHWND flag. All other flags require this member to be set to zero.

-param fdwAdd

Flags for adding ACM drivers. The following values are defined.

Value Meaning
ACM_DRIVERADDF_FUNCTION The lParam parameter is a driver function address conforming to the acmDriverProc prototype. The function may reside in either an executable or DLL file.
ACM_DRIVERADDF_GLOBAL Provided for compatibility with 16-bit applications. For the Win32 API, ACM drivers added by the acmDriverAdd function can be used only by the application that added the driver. This is true whether or not ACM_DRIVERADDF_GLOBAL is specified. For more information, see Adding Drivers Within an Application.
ACM_DRIVERADDF_LOCAL The ACM automatically gives a local driver higher priority than a global driver when searching for a driver to satisfy a function call. For more information, see Adding Drivers Within an Application.
ACM_DRIVERADDF_NAME The lParam parameter is a registry value name in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32. The value identifies a DLL that implements an ACM codec. Applications can use this flag if new registry entries are created after the application has already started using the ACM.
ACM_DRIVERADDF_NOTIFYHWND The lParam parameter is a handle of a notification window that receives messages when changes to global driver priorities and states are made. The window message to receive is defined by the application and must be passed in dwPriority. The wParam and lParam parameters passed with the window message are reserved for future use and should be ignored. ACM_DRIVERADDF_GLOBAL cannot be specified in conjunction with this flag. For more information about driver priorities, see the description for the acmDriverPriority function.

-returns

Returns zero if successful or an error otherwise. Possible error values include the following.

Return code Description
MMSYSERR_INVALFLAG
At least one flag is invalid.
MMSYSERR_INVALPARAM
At least one parameter is invalid.
MMSYSERR_NOMEM
The system is unable to allocate resources.

-see-also

Audio Compression Functions

Audio Compression Manager

-remarks

Note

The msacm.h header defines acmDriverAdd as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.