ImmGetIMEFileName function

Retrieves the file name of the IME associated with the specified input locale.


UINT ImmGetIMEFileName(
  _In_      HKL    hKL,
  _Out_opt_ LPTSTR lpszFileName,
  _In_      UINT   uBufLen


hKL [in]

Input locale identifier.

lpszFileName [out, optional]

Pointer to a buffer in which the function retrieves the file name. This parameter contains NULL when uBufLen is set to NULL.

uBufLen [in]

Size, in bytes, of the output buffer. The application specifies 0 if the function is to return the buffer size needed to receive the file name, not including the terminating null character. For Unicode, uBufLen specifies the size in Unicode characters, not including the terminating null character.

Return value

Returns the number of bytes in the file name copied to the output buffer. If the application sets uBufLen to 0, the function returns the size of the buffer required for the file name. In either case, the terminating null character is not included.

For Unicode, the function returns the number of Unicode characters copied into the output buffer, not including the Unicode terminating null character.


In the registry, the operating system stores the file name as the "IME name value" in the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layouts\HKL.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]


East Asian language support installed.


Imm.h (include Windows.h)





Unicode and ANSI names

ImmGetIMEFileNameW (Unicode) and ImmGetIMEFileNameA (ANSI)

See also

Input Method Manager
Input Method Manager Functions