Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is a subprocess equivalent in c?

Status
Not open for further replies.

Negneg

Programmer
Dec 29, 2010
10
Hi everyone,

I need to find out how can I replace a subprocess function in c?!
I have used fork() but seems this function works for UNIX.. I am using windows, so could anyone tell me how can I execute a file in c using windows? what is CreateProcess()? I am confused
sad.gif
 
so whats wrong with this part of my code?

if (CreateProcess(
"C:\\Documents and Settings\\aps user 3\\My Documents\\Visual Studio 2008\\Projects\\Server\\Server\\running",NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi)<0)
fprintf(stderr,"ERROR on Create Process");
.......

Note:running file is a .py file
 
Move the 1st parameter to the 2nd parameter, make the 1st parameter NULL
 
hmmm tnx a lot..I will go though it but before that I need to solve this as well: I receive error C2065: 'si' : undeclared identifier, how can I define si??
I appreciate your help in advance:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top