Hi All,
I went through the createprocess function documentation on MSDN website.
however i could not find a way to call a function using createprocess. Here are brief details of what i am trying to do
1. main process [a running program itself is a main process]. i am running a program in MSVE 2013 for windows desktop.
2. that main process receives user inputs via CMDLINE.
3. main process is a simple program waiting for user input commands and spawn a process [i.e. createprocess]. Assume display prompt something like [=main=>].
4. say i issue command A , B and C.
5. Based on input A, program need to createprocess on existing .exe [executable] and it is up and running.
6. Based on input B, program need to invoke a function. please note this function B has its own cmdline interface [=CMD=>] and that [=CMD=>] need to intake arguments [since it is now a seperate PROCESS, i expect it to act on its own] and be able to receive inputs via [ [=CMD=>]] and then call a function. please note my function B has inbuilt PROMPT capability.
7. similar like step 6, i want same functionality for step 7 as well [i.e. input C]. prompt is something like =C=>. function C is here. please note my function C has inbuilt PROMPT capability.
objective at the end: -
=main=> will take inputs A and then run a executable
=CMD=> will take inputs B and should act independently run a executable and simultaneously take inputs from different prompt
=C=> will take inputs B and should act independently run a executable and simultaneously take inputs from different prompt
now questions,
1. How can i link or hook a function to createprocess function.
2. please note my functionality can change within the 6 and 7, so i CANNOT afford to make function B as an executable and function C as an executable and call them as cmdline
3. can i use createprocess within a function called by createthread() ??
4. basically, when i create a process, i need to trigger a callback function
Thanks
RC Reddy