惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
V
Visual Studio Blog
B
Blog
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
L
LangChain Blog
D
Docker

博客园 - Clingingboy

冒个泡,刷刷存在感 使用文件映射和信号量来进程间通信 Xperf Basics: Recording a Trace (the easy way)(转) Xperf Basics: Recording a Trace(转) Xperf Analysis Basics(转) Android相关sdk使用 Uniscribe文字自动换行 Chrome RenderText分析(2) c++智能指针 GUI 快捷键的实现思路 Menu实现逻辑 控件保持多种绘图状态的做法 2个函数宏技巧 绘图 Painter转接口封装的方式 DirectUI消息循环的简单封装 c++以代理的方式来实现接口化编程 c++对象工厂 使用模板来解决接口继承问题 VC++ 使用attributes定义接口
codepage IMLangCodePages
Clingingboy · 2013-12-02 · via 博客园 - Clingingboy

2013-12-02 14:47  Clingingboy  阅读(503)  评论()    收藏  举报

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;
}