Designing Local ACM Drivers

Local ACM drivers are available only to a specific application. The application must explicitly add the driver to the ACM’s list of available drivers with a call to acmDriverAdd, which is exported by the ACM and described in the Win32 SDK. If you are writing a local ACM driver, you can locate your driver code in your application or in a separate DLL file.

Including ACM Driver Code in an Application

If you include ACM driver code within an application, the application must define a DriverProc function that recognizes ACM driver messages. To access the ACM driver code, your application must:

·Call acmDriverAdd, specifying it’s own module handle as an input parameter.

·Communicate with the driver code by calling the ACM’s API functions.

·Call acmDriverRemove when it has finished using the ACM driver code.

Providing a Local ACM Driver as a Separate DLL

If you provide a local ACM driver as a separate DLL, your application must call LoadLibrary (see the Win32 SDK) to load the driver. The driver must define a DriverProc function that recognizes ACM driver messages. After the driver has been loaded, it must:

·Call acmDriverAdd, specifying it’s own module handle as an input parameter.

·Respond to ACM driver messages received when the application calls the ACM’s API functions.

·Call acmDriverRemove when the application signals that it has finished using the driver.