01.ImmInstallIME("C:/WINDOWS/system32/123.dll","扩展输入法"); 02. typedef int (CALLBACK * IMESetPubStringFunc)(LPCTSTR tmpStr,DWORD UnloadDLL,DWORD loadNextIme,DWORD DllData1,DWORD DllData2,DWORD DllData3); 03. IMESetPubStringFunc IMESetPubString = NULL; 04. HINSTANCE hDll=LoadLibrary(_T("123.dll")); 05. if(0!=hDll) 06. { 07. ::SendMessage(m_hWnd, WM_INPUTLANGCHANGEREQUEST, 1, (LPARAM)hDll); 08. ::SendMessage(m_hWnd, WM_INPUTLANGCHANGE, 1, (LPARAM)hDll); 09. IMESetPubString=(IMESetPubStringFunc)GetProcAddress(hDll,"IMESetPubString"); 10. IMESetPubString("C:/dll.dll",0,0,0,0,0); 11. FreeLibrary(hDll); 12. } 13. else 14. { 15. AfxMessageBox(_T("获取DLL句柄失败。。")); 16. }