#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    athome
    Posts
    50
    Rep Power
    13

    calling an executable


    hi,

    i'm a newbie to ANSI C.
    Can anybody tell me how i can execute an executable (like php.exe) from C programming langauge.

    thx in adv
    w2k-user
  2. #2
  3. *bounce*
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Delft, The Netherlands
    Posts
    514
    Rep Power
    42
    Well, the only ANSI C compliant method is by calling system(). In UNIX and GNU/Linux you can use the fork() and exec() set of functions (see the man pages).

    In Windows, I think there's some CreateProcess() function call. Check the win32 API reference for details.
    "A poor programmer is he who blames his tools."
    http://analyser.oli.tudelft.nl/
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    Windows also has WinExec()
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    athome
    Posts
    50
    Rep Power
    13

    Thumbs up thx


    thank you guys.
    that's just what i needed.

    cu
    w2k-user

IMN logo majestic logo threadwatch logo seochat tools logo