Problem with IMultiLanguage2 interface, thanks. (VC6 with Platform SDK Feb,2003)  
Author Message
Ryx1982





PostPosted: Visual C++ General, Problem with IMultiLanguage2 interface, thanks. (VC6 with Platform SDK Feb,2003) Top

Hello everybody,

         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;
 DetectEncodingInfo dei[32];
 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 de**** window.

 

       I got so confused. Thanks for your answer

 

Best regards,

 

                                                                                                                                      Jeffrey




Visual C++3  
 
 
Damien Watkins - MSFT





PostPosted: Visual C++ General, Problem with IMultiLanguage2 interface, thanks. (VC6 with Platform SDK Feb,2003) Top

Hello

Re: Problem with IMultiLanguage2 interface, thanks. (VC6 with Platform SDK Feb,2003)

Such questions (on VC++6.0) are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1

For such issues please use an appropriate newsgroup, potentially one at http://msdn.microsoft.com/newsgroups.

OTP

Thanks

Damien