How to invoke C++ from Javascript

sharmila's Avatar, Join Date: Mar 2006
Contributor
Hi,
Can anyone explain me how to invoke a c++ function from javascript?

Regards,
sharmila.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Here 's how to do that using ActiveX object.

Code: JavaScript
function executeCommands(inputparms)
 {
     // Instantiate the Shell object
     var oShell = new ActiveXObject("Shell.Application");
 
     var commandtoRun = "C:\\Programs\\YourCProgram.exe";
     // Invoke the execute method. 
     oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1");
 }