Share via


Registering an Input Module

Each IME module must register a COM class in the Windows registry. The class must be created through the CoCreateInstance function. The class identifier (CLSID) for each IME module is compiled into a Windows Media Center shell source file. This source file contains a list of supported IME modules for each locale/language for which Microsoft builds a version of the shell. This source file also indicates the certificate that is recognized as valid for each IME module.

An IME module is a COM component that supports and exposes the IMediaCenterInputModule interface and is registered as a member of the CATID_MediaCenterInputModule {217d378c-f344-4f17-bf44-7c770d7dd73d} component category. An IME module should also register the preferred language. To register a language, use a subkey called LCID under HKEY_CLASSES_ROOT\CLSID\{CLSID of your component}, with a default value of the locale identifier (ID) of the language that your IME module supports. For example, the default locale ID for English would be 1033.

An IME module must also register its COM CLSID in the following location in the registry, where LCID is the 4-digit language code that matches the language that is implemented by the IME module:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\IME\LCID]

{CLSID of your component}=""

When the Windows Media Center shell starts, it looks for an IME module registered under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\IME\LCID, where LCID is the 4-digit language code that matches the language that is used by the shell. Windows Media Center also verifies that the IME module listed in this registry sub-key is registered with the CATID_MediaCenterInputModule category ID. If both conditions are satisfied, the shell creates and uses that IME module.

If multiple IME modules are registered for the same language, Windows Media Center checks the Priority value and uses IME module with the lowest numerical value that it finds (in other words, Priority 0 is used over Priority 1, 2, and so on). The Priority value must appear in the following format for Windows Media Center to recognize it:

Key: [HKEY_CLASSES_ROOT\CLSID\{IME_GUID}\Priority]

Name: Priority = <value>

Type: REG_DWORD

If no Priority value is specified, Windows Media Center assigns a default Priority value of 0 to the IME module. If more than one IME module has the same Priority value, Windows Media Center uses the first IME module that it finds when sorting alphabetically by IME_GUID.

See Also