I encountered some problem using the IMultiLanguage interface. I found the calling of one of its method always failed with the error number 14007:
The requested lookup key was not found in any active activation context.
The code piece is shown below, where ml is CMultiLanguage object that implements several interafaces, such as IMultiLanguage2 etc, :
HRESULT hr = CoCreateInstance(CLSID_CMultiLanguage,NULL,CLSCTX_INPROC_SERVER,IID_IMultiLanguage2, (VOID**)&ml);
INT nEns = 0;
CHAR * buf = "Good morning. This is indeed a string in US English.";
INT nRead = 80;
hr = ml->DetectInputCodepage(MLDETECTCP_8BIT,NULL,buf,&nRead,(DetectEncodingInfo*)dei,&nEns);
And I trace into the program, only to find that creation of the ml object is successful but can only get IUnknown interface, with no other super interfaces shown in the debugger window.
I got so confused. Thanks for your answer