ENGINEERING FORUMS

WELCOME GUEST,
You may have to register before you can post: click the register to proceed. To start viewing messages, select the forum that you want to visit from the selection. From www.bunkerszone.co.cc

Join the forum, it's quick and easy

ENGINEERING FORUMS

WELCOME GUEST,
You may have to register before you can post: click the register to proceed. To start viewing messages, select the forum that you want to visit from the selection. From www.bunkerszone.co.cc

ENGINEERING FORUMS

Would you like to react to this message? Create an account in a few clicks or log in to continue.
ENGINEERING FORUMS

hi

Sorry For The Themes I Am Still Working On it. Still I Need Some Help Needed Moderators And Co-owners Pm me

    [HOWTO] How to call another application in C++

    Admin
    Admin
    Übergod
    Übergod


    Posts : 360
    Reputation : 3
    Join date : 2010-07-18
    Age : 30
    Location : Rajam

      [HOWTO] How to call another application in C++ Empty [HOWTO] How to call another application in C++

    Post by Admin Sat Jul 31, 2010 4:08 pm

    Credits-Mad hacker

    Simple Code which calls another exe file named trojan.exe
    Code:

    #include <iostream>
    #include <windows.h>
    using namespace std;

    void file()
    {
      ShellExecute(NULL, "open", "C:\\Program Files\\trojan\\trojan.exe",
                                    NULL, NULL, SW_SHOWNORMAL);
    }

    int main()
    {
    file();
    return 0;
    }


    NOTE: To use non-8.3 filenames on the command line, either escape the space ('Program\ Files' or "Program\\ Files" in a C string), enclose the path in quotes ('"C:/Program Files/"') or use the 8.3 abbreviation ('Progra~1').

    Using something like %SystemDrive%\program files\sub directory\program.exe if C: isn't the default directory as shown in the above code.

      Current date/time is Fri May 17, 2024 1:06 pm