Results 1 to 6 of 6

Thread: Incorporating a c++ program into a website

  1. #1
    Junior Member
    Join Date
    Nov 2003

    Incorporating a c++ program into a website

    I'm trying to embed a computer program and embed it into a website. Is there a special plugin that I can use, or is it even possible? I want the the program to actually be in the website, where users can interface with it. Does anybody know how to do it, or if it can be done?

  2. #2
    AO Ancient: Team Leader
    Join Date
    Oct 2002
    An executable in the form you imply would have to be downloaded someow and executed on the client machine.
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

  3. #3
    Senior Member
    Join Date
    Mar 2004

    intrinsic problem

    There is an intrinsic problem with "c/c++/...-applications": Executables
    are compiled for a certain platform and thus are not machine-
    independent. You could in principle provide a browser plug-in,
    which downloads the source code (or an executable), compiles it (with
    some compiler...) and runs it - somehow. However, already with the simplest
    applications, there are differences in the various platforms, hence, this is
    not feasible.


    The practicability of each alternative strongly depends on the

    The most simple alternative is to provide the code in some client-side
    scripting language (e.g. javascript, perlscript, VBscript, Tcl/Tk, ...).

    Another possibility is to involve server-side scripting (e.g. CGI, php, asp,
    perl, jsp, ...). The users interaction is transmitted to the server
    using a form-like structure. Then, you have two possibilities: rewrite the
    application to your server-side language or call the c++-application on
    your server by involving the users interaction parameters.

    Develop your program in a machine-independent language. Usually, people
    can run any flash-application and do have the jre to run java-applications.
    Another possibility might be the .NET framework, but the requirement
    are above the usual standard.

    Good luck

    If the only tool you have is a hammer, you tend to see every problem as a nail.
    (Abraham Maslow, Psychologist, 1908-70)

  4. #4
    Senior Member
    Join Date
    Oct 2004
    i vaguely remember being able to that using visual studio. VB should allow you to do it easily although i'm really not sure how. There is a way by which the program interface shows up in a browser rather than a window. You might need to have the VB runtime files for that at the client side.
    Never trouble another for what you can do for yourself.
    -Thomas Jefferson


  5. #5
    Senior Member
    Join Date
    Jan 2003
    Hey Hey,

    Using Visual Studio 2003, you can develop VC++ ActiveX Controls.... This would be able to be executed from a website.

    A control using ActiveX technologies. An ActiveX control can be automatically downloaded and executed by a Web browser. ActiveX is not a programming language, but rather a set of rules for how applications should share information. Programmers can develop ActiveX controls in a variety of languages, including C, C++, Visual Basic, and Java.

    An ActiveX control is similar to a Java applet. Unlike Java applets, however, ActiveX controls have full access to the Windows operating system. This gives them much more power than Java applets, but with this power comes a certain risk that the applet may damage software or data on your machine. To control this risk, Microsoft developed a registration system so that browsers can identify and authenticate an ActiveX control before downloading it. Another difference between Java applets and ActiveX controls is that Java applets can be written to run on all platforms, whereas ActiveX controls are currently limited to Windows environments.
    IT Blog: .:Computer Defense:.
    PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".

  6. #6
    Join Date
    Jul 2005
    Okay, you have a C++ Application, which I'll call APP from now on. First of all, do you want APP to run on the server side or on the client side? For example, APP could be running on the server side, doing all kinds of actions based on incoming requests from the client and generating all kinds of output. Or your clients just download APP on the client and run it from there.

    Client-side APP is simple, but probably requires the client to run some installation script. But it would then just be doing things on the client side, unless APP is e.g. a webservice client itself. Client-side APP does have a limitation, though. The client might be using a different operating system.

    Server-side APP would be a bit tough. It would eat up quite a few system resources and it will also be very limited in the things it can do. Server-side applications will run with only a few privileges so this is a serious limitation. But there are still quite a few of such server-side applications that just run as CGI applications. Actually, almost anything can be run at the server side, including (*.bat) batch files, to produce a webpage for you. All your webserver needs to know is that it needs to execute those files, instead of sending those files to the client. Whatever they send to the generic output consode is then captured by the server and sent to the client. (And the input console is the web request.) Basically, CGI's aren't difficult to write. Just a nuisance because they are pretty limited in what they can access...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts