callC

NES2+Syntax

callC(JSFuncName, arg1, arg2, …, argN)

Description

The callC function is a top-level function that is not associated with any core object. callC is used to call a JavaScript function that references a C function in a shared library. These libraries are the pre-built .dll files on Windows machines and .so files on UNIX machines. callC takes the JavaScript name you have assigned the C function and any arguments the function needs as arguments.

Before you can call this function, you must register the C library using the server-side JavaScript registerCFunction. registerCFunction takes the JavaScript name with which you want to reference the function, the path to the library, and the C function name as parameters.

Example ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.