codepage IMLangCodePages

时间:2021-05-26 05:34:46

 

http://baike.baidu.com/link?url=78DSTGAri8dvHNLQ03rThSKieJqhFwFWL4sQMao6cfaRSOUWN88QVBwmSJPCZch0vfyChnSoRHC1iscdGiSHOK

使用COM对象查询

CoCreateInstance(CLISD_MLANG,NULL,CLSCTX_INPROC_SERVER,__uuidof(IMultiLanguage),(void**)&m_pLanguage);

CComQIPtr<IMLangCodePages> pPages = m_pLanguage;

DWORD* pdwCodePages=0;

pPages ->GetCharCodePages(wCh,pdwCodePages);

pPages->CodePagesToCodePage(*pdwCodePages,1252,pdwCodePage);
if (*pdwCodePage == 1252)
{
return S_OK;
}
pPages->CodePagesToCodePage(*pdwCodePages,936,pdwCodePage);
if (*pdwCodePage == 936)
{
return S_OK;
}