Writing ACM Drivers

The best way to write an ACM driver is to select one of the sample drivers provided with the DDK and modify the code as required to implement new conversions and features. The comments in the sample code provide a detailed explanation of the different responses to each message and indicate which parts need to be modified for a new driver.

Sample ACM Drivers

Three sample ACM drivers are provided with the DDK.

Tips for Writing ACM Drivers

This section provides some guidelines for writing ACM drivers.

Writing Portable ACM Drivers

Most of the features of the ACM in Windows 95 are also provided in Windows NT 3.5. If written correctly, 32-bit ACM drivers written for Windows 95 will run unmodified on Windows NT 3.5; it should not even be necessary to recompile them. A developer can simply ship the Windows 95 driver as the x86 Windows NT 3.5 driver. All the sample ACM drivers provided in the DDK offer binary compatibility with Windows NT 3.5, and the ACM drivers shipping with Windows 95 offer binary compatibility with Windows NT 3.5.

To help maintain compatibility between Windows platforms, use the private LoadStringCodec function instead of the LoadString function. LoadStringCodec is a private function included in the sample ACM drivers. Using this function (together with the SIZEOFACMSTR macro) will solve most of your Unicode problems.

Features available in the ACM in Windows 95 that are not available in Windows NT 3.5 include support for asynchronous conversions and support for Plug-and-Play. Both of these features are useful only for drivers that rely on hardware support.