最近在使用Detours 庫攔截windows API,在攔截到ExtTextOutW時輸出字串是亂碼問題,網路上有人指出這是由于
ExtTextOutW函式的引數fuOption指定了ETO_GLYPH_INDEX ,MSDN上解釋如下:
The lpString array refers to an array returned from GetCharacterPlacement and should be parsed directly by GDI as no further language-specific processing is required. Glyph indexing only applies to TrueType fonts, but the flag can be used for bitmap and vector fonts to indicate that no further language processing is necessary and GDI should process the string directly. Note that all glyph indexes are 16-bit values even though the string is assumed to be an array of 8-bit values for raster fonts.
但是在截獲時并沒有截獲到GetCharacterPlacement 這個函式? 有人解釋一下字符的索引是怎么得到么??
uj5u.com熱心網友回復:
ExtTextOutW可能是由DrawText呼叫的uj5u.com熱心網友回復:
試過了,也不是,反匯編我也看了,都不行,不知道怎么回事了。
uj5u.com熱心網友回復:
我也遇到這個問題,幫頂!uj5u.com熱心網友回復:
下載“windows圖形編程源代碼\Samples\Chapt_04\Patcher\main.cpp“
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/96809.html
標籤:基礎類
