I'm having a few problems understanding the syntax of using the CreateProcess() function. I searched the forums, and came up with this page:
which has begun to clear up this question for me. I see it repeatedly on this forum, and it has been praised more than once as a great source for understanding the createProcess function, but I still have much to understand, even with the explanations given for the individual lines of the syntax code. I have been trying that syntax code out as a sort of "stencil" I guess, attempting to place the correct directory in the applicationname section, but not getting much of anywhere. I was hoping to find a sample program of this used somewhere in its most basic form to open up, say, the windows calculator.
The reason I have become so adamant on using the CreateProcess function is because as I understand it has the ability to close an application which it opens, a feature which ( also if I have gathered correctly) cannot be done using system(), which is ultimately what I am trying to do. (I have gotten system() to open up the program, but not close it)
I'm not an absolute beginner ( well, relative to the forum members, I am) but many key words I have seen while attempting to understand this function (handles, commandline console, etc) have sent me into a Wikipedia'ing frenzy, trying to understand each word while putting together the big picture. A little difficult, I think.
So, If I could fond the simplest running program which is able to use createProcess to open a program (and maybe a short explanation?) I may be a little closer. I can worry about the closing program issue after.
Oh, I'm running Visual C++ 2005 Express edition. Upon finding out I needed a software pack to include the windows.h library, I instead switched to VC++ 2008 Express.
Hopefully I'm not forgetting anything. Thank you tons for any help!