• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1388
  • Last Modified:

What ANSI C function to call an external program ?

Currently I want to write a dll in ANSI C, and I will call an external program to help to get the job done. Does any one know which C function can call an external program and passs argument to it (like Visual C++ WinExec or CreateProcess).
1 Solution
system("program args");
system() is the ANSI standard call for passing something to the command line.  For example, system("notepad.exe file.txt"); will start notepad with that argument on the command line.

Some systems may also have things such as exec() and spawn(), but those aren't part of the ANSI C standard.

Featured Post

Easily manage email signatures in Office 365

Managing email signatures in Office 365 can be a challenging task if you don't have the right tool. CodeTwo Email Signatures for Office 365 will help you implement a unified email signature look, no matter what email client is used by users. Test it for free!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now