On Thu, Aug 20, 2009 at 9:07 PM, jfc <[email protected]> wrote:

>
> Does anyone have an example/howto on the following:
>
> An existing windows dll that provides some functionality like char*
> getMessage().


Binding a DLL wrapper is identical to binding your own code to v8. 90% of
the wrapping process is converting the application data to/from JS/C/C++.
There is no special interface for wrapping DLLs. You simply create a binder
function (or class, or family of functions) for the APIs exported by the
DLL.


> Create a V8 javascript wrapper to call this C/C++ function from
> javascript.


This is documented fairly well on the v8 home page (
http://code.google.com/p/v8/) and is demonstrated in the code of several
v8-based libraries, such as (but not limited to):

http://code.google.com/p/v8-juice/
http://code.google.com/p/cproxyv8/
http://code.google.com/p/v8cgi/

(An interesting URL pattern appears.)


> Finally working this all work within Chrome.


AFAIK, this could only be made visible to Chrome if Chrome supports loading
native plugins AND it exposes the JS engine to those plugins. i have no idea
if it does either of those (still waiting on Chrome for Linux).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to