Partager via


Active Input Method Manager

Active Input Method Manager (IMM) provides limited Asian character input support on non-Asian versions of Windows 95, Windows 98, and Microsoft Windows NT 4.0.

Note  Active IMM is not meant as a replacement for the Microsoft Win32Input Method Manager (IMM) API, and it offers only limited IMM support.Windows 2000 will provide complete cross-language input support.

 

The following topics are covered in this article:

  • Prerequisites and Requirements
  • Key Terms
    • Input Method Manager
    • Active Input Method Manager
  • Supporting Active IMM

Prerequisites and Requirements

This documentation assumes you are familiar with the Win32 IMM API and Input Method Editors (IMEs). For more information on the Win32 IMM API, see the documentation in the Windows Software Development Kit (SDK). For more information on IMEs, see the Microsoft Windows NT 4.0 Device Driver Kit.

Key Terms

These terms will help you understand the Active IMM API.

Input Method Manager

The IMM is a component in the Windows system that provides a connection between the application and Input Method Editors (IME) used primarily to input Asian characters. The IMM also manages the installation of IMEs. IMEs are implemented as one of a number of keyboard layouts. IMM support is only available in the Asian versions of Windows 95 or later and Microsoft Windows NT 4.0. Because Windows 2000 contains cross-language version IMM support, it does not require Active IMM. Therefore, Active IMM is disabled for Windows 2000 and later.

Active Input Method Manager

The Active IMM is an Microsoft ActiveX object that provides limited IMM service on non-Asian language versions of Windows and Microsoft Windows NT 4.0 platforms. Conventional IMM service was available only on Asian Windows and Microsoft Windows NT 4.0. Active IMM can be installed on any language version of these two platforms. Active IMM will provide limited IMM service for supporting clients only for these platforms. On Asian language versions of Microsoft Windows NT 4.0 and Windows 95 or later, Active IMM simply works as a wrapper to the native IMM system.

The Active Input Method Editors (IMEs) are also implemented as keyboard layouts, but they are only accessible when an Active IMM client application has the focus. Applications that are not Active IMM-aware remain unaware of the Active IME keyboard layouts. Microsoft has developed a limited number of Asian Active IMEs that make use of the Active IMM, including Japanese, Korean, simplified Chinese, and traditional Chinese Active IMEs.

Supporting Active IMM

To support Active IMM, client applications are required to follow these steps:

  1. Call CoCreateInstance to create an instance of the Active Input Method Manager.

  2. Obtain a pointer to the IActiveIMMApp interface.

  3. Obtain a pointer to the IActiveIMMMessagePumpOwner interface, if the client application owns the message pump.

  4. Call the IActiveIMMApp::Activate method to start the Active IMM service.

    Client applications should call the IActiveIMMApp::Activate method on each thread they want to enable or disable support for Active IMEs on.

  5. Call the IActiveIMMMessagePumpOwner::Start method, if the client application owns the message pump.

  6. Call the IActiveIMMApp::OnDefWindowProc method instead of calling DefWindowProc. Only call DefWindowProc if the return value of IActiveIMMApp::OnDefWindowProc indicates the call wasn't handled.

  7. Call the IActiveIMMMessagePumpOwner::OnTranslateMessage method instead of calling TranslateMessage. Only call TranslateMessage if the return value indicates the call wasn't handled.

  8. Optional. Call IActiveIMMApp::FilterClientWindows to limit which window classes allow Active IME interaction. This is particularly useful to prevent interaction with component windows (such as Win32 Common Controls) that do not support Active IMEs.

  9. Call the Active IMM methods instead of using the Win32 IMM APIs.