But my scenario is: another standalone program does the translating, and I want 
the procedure of capturing the word
be transparent to chrome.


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

Were I to write something like this, I would use a user script
injected into the page.  I would not attempt to catch OS-level hooks
like this.

>From JavaScript you can capture mouse moved events, get the current
text under the cursor, and send that off to some server for
translation.

-eric

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