Audio Compression Managers are provided for Windows NT® and for Windowsâ 95. The interfaces provided by both ACMs are identical. You can write binary-compatible ACM drivers that are portable between Windows NT and Windows 95, by obeying the following rules:
·Do not call API functions that are only available under Windows NT. (Almost all functions described in the Win32 SDK are available under both Windows NT and Windows 95.)
·Do not compile with the UNICODE constant defined.
The second rule requires further discussion. Windows NT provides Unicode versions of all Win32 API functions, but Windows 95 does not (with a few exceptions). However, ACM drivers must always pass Unicode strings to the ACM, whether the ACM is running under Windows NT or Windows 95. To get around this conflict, your ACM driver can include a copy of the LoadStringCodec function that is defined in the sample ACM drivers.
The LoadStringCodec function loads a string resource and converts the string to Unicode, even if the source code was not compiled with the UNICODE constant defined. The converted string can then be passed to the ACM (in an ACMDRIVERDETAILS structure, for example). You can also convert between Unicode and ANSI strings by calling the MultiByteToWideChar and WideCharToMultiByte functions that are described in the Win32 SDK.
The sample ACM drivers are written to be binary-compatible with Windows NT and Windows 95.