The ImmGetDescription API Method is not functioning well when getting descripitions of the input methodsMicsrosoft Office IME 2007 and versions above.
The Code Is Here:
HKL m_lLayoutHandle = GetKeyboardLayout(0);
HWND m_lTargetWindow = hDlg;
GUITHREADINFO Gti;
::ZeroMemory ( &Gti,sizeof(GUITHREADINFO));
Gti.cbSize = sizeof( GUITHREADINFO );
::GetGUIThreadInfo(0,&Gti);
DWORD dwThread = ::GetWindowThreadProcessId(Gti.hwndActive,0);
HKL lang = ::GetKeyboardLayout(dwThread);
TCHAR szImeFileName[64];
DWORD dwResult = ImmGetDescription(lang, szImeFileName, 64);
MessageBox(hDlg,(LPCTSTR)(szImeFileName),TEXT("OK"),0);
TCHAR szImeFileID[MAX_PATH];
ZeroMemory(szImeFileID,MAX_PATH);
GetKeyboardLayoutName(szImeFileID);
MessageBox(hDlg,(LPCTSTR)(szImeFileID),TEXT("OK"),0);
Is there anybody can solve my problem? There is another question,Why does The API GetKeyboardLayoutName always returns
0x00000411
,when I use the IME 2007 input method and my local language is japanese,and I expect the return value to represent the regedit value of IME 2007.