Hello Everyone

Currently, I am using system("dir") method to call system calls.
I want to know any other method for system calls in VC++ 2008.
How can I call system call in VC++2008 without using system(" ") method?

Any help would be appreciated

Never use system()
Just use kernel or user apis.

Can you please give some examples of kernel or user APIs ?

how can i write system("dir") to kernel or user API level?


ShellExecute is a Windows kernal api for doing what you are asking.

Each OS will have a different way of doing things so expect to use #ifdef/#endif pairs if cross-platform support is ever needed.

ShellExecute works similarly