Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   How to invoke C++ from Javascript (http://www.go4expert.com/forums/invoke-cpp-javascript-t1883/)

sharmila 14Nov2006 09:56

How to invoke C++ from Javascript
 
Hi,
Can anyone explain me how to invoke a c++ function from javascript?

Regards,
sharmila.

pradeep 14Nov2006 10:19

Re: How to invoke C++ from Javascript
 
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");
 }



All times are GMT +5.5. The time now is 01:19.