passing parameters to a file

I was wondering how you could pass parameters to a program?

e.g:
dir /O
I was wondering how
you could pass arguments,/O,
to a program.
Last edited on
That depends on the library you want/have to use.

In the Windows CRT there's a function called _spawnl().
http://msdn.microsoft.com/en-us/library/wweek9sc.aspx

In the Win32 lib there's: CreateProcess().
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx

In dotNet it's the class: System::Diagnostics::Process
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx

There are probably other functions in other libs, but I can't remember off the top of my head.
Topic archived. No new replies allowed.