yeah, you are right.
I have found that 'Invalidation' didn't trigger a 'textout' but a redraw of a 
rectangle, maybe 'bitblt' or so.



----- Original Message -----
From: "Amit Joshi" <a...@chromium.org>
To: "xb zhou" <xb.z...@qq.com>
Cc: chromium-dev@googlegroups.com
Sent: 2010年 9 月 16日, 星期四 上午 5:07:23 GMT +08:00 Beijing / Chongqing / Hong Kong 
/ Urumqi
Subject: Re: [chromium-dev] Problem in Hooking 'ExTextOut'

It's probably better to look at how windows accessibility (like reading out
text on screen) works than try and hook ExtTextOut. Note that the same
renderer process could be used for multiple tabs and rendering for each
paint happens totally asynchronously. Hence ExtTextOut will often get called
for totally different reason than to paint the text due to your
invalidation.

On Wed, Sep 15, 2010 at 10:04 AM, ZHOU Xiaobo <xb.z...@qq.com> wrote:

> Hi:
>
>  I want to:
>         capture the word under my cursor and translate it into Chinese. A
> normal way to achieve this is injecting a DLL and hooking the
> systemcall 'ExTextOut'; when my cursor move over the word, an
> 'invalidatedata' will be invoked and 'ExTextOut' too, then I
> can get the word.
>
>       Since the 'render' process of Chrome has no window, I create a remote
> thread into the 'render' process's address
> space and call 'LoadLibrary' to load my DLL. The result is the 'OpenFile'
> failed.
>
>  I found:
>         'OpenFile' is hooked and the address is 'ErrorXXX'(or sth like
> that).
> So I manually changed the address to the real adress of 'OpenFile' in
> 'NTDLL', but it still failed
> with error: 'permission denied'.
>
>
>  My question is:
>         what the sandbox does is just hooking a subset of the systemcall
> such as 'OpenFile' 'CreateProcess' etc ?
>         what is the correct way to achieve my goal?
>
> thanks a lot.
>
>
>
>
>
>
>                        ZHOU Xiaobo
>
>
>
> --
> Chromium Developers mailing list: chromium-dev@googlegroups.com
> View archives, change email options, or unsubscribe:
>    http://groups.google.com/group/chromium-dev
>


-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev

Reply via email to