麻烦解决一下ExtTextOutW输出问题

[复制链接]
查看11 | 回复4 | 2021-1-27 05:35:59 | 显示全部楼层 |阅读模式
最近在使用Detours库拦截windowsAPI,在拦截到ExtTextOutW时输出字符串是乱码问题,网络上有人指出这是由于
ExtTextOutW函数的参数fuOption指定了ETO_GLYPH_INDEX,MSDN上解释如下:
ThelpStringarrayreferstoanarrayreturnedfromGetCharacterPlacementandshouldbeparseddirectlybyGDIasnofurtherlanguage-specificprocessingisrequired.GlyphindexingonlyappliestoTrueTypefonts,buttheflagcanbeusedforbitmapandvectorfontstoindicatethatnofurtherlanguageprocessingisnecessaryandGDIshouldprocessthestringdirectly.Notethatallglyphindexesare16-bitvalueseventhoughthestringisassumedtobeanarrayof8-bitvaluesforrasterfonts.
但是在截获时并没有截获到GetCharacterPlacement这个函数?有人解释一下字符的索引是怎么得到么??

分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:35:59 | 显示全部楼层
ExtTextOutW可能是由DrawText调用的
回复

使用道具 举报

千问 | 2021-1-27 05:35:59 | 显示全部楼层
引用1楼hurryboylqs的回复:ExtTextOutW可能是由DrawText调用的
试过了,也不是,反汇编我也看了,都不行,不知道怎么回事了。
回复

使用道具 举报

千问 | 2021-1-27 05:35:59 | 显示全部楼层
我也遇到这个问题,帮顶!
回复

使用道具 举报

千问 | 2021-1-27 05:35:59 | 显示全部楼层
下载
“windows图形编程源代码\Samples\Chapt_04\Patcher\main.cpp“
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行