registerCFunction

NES2+Syntax

registerCFunction(JSFuncName, libPath, CFunc)

Description

registerCFunction is a top-level function that is not associated with any core object. registerCFunction is used to register a C function in a shared library as a JavaScript function so it can be used in your scripts. These libraries are the pre-built .dll files on Windows machines and .so files on UNIX machines. registerCFunction takes the JavaScript name you want to assign the C function, the path to the library, and the actual name of the C function you want to register in the library. The function returns a boolean value based on the success of the registration.

After you call this function, you can use the C library with the server-side JavaScript ...

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.