• C

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).
eugenengAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
system("program args");
0
deliriumCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.