Article ID: 194948
Article Last Modified on 6/23/2005
/* Parent.c -- This is the CGI process created by IIS */
int main(int argc, char *argv[])
{
FILE *pFile = _popen("c:\\inetput\\scripts\\child.exe", "rt");
char cBuf[256];
printf("HTTP/1.0 200 Ok\r\nContent-Type: test/html\r\n\r\n");
printf("<H1>I'm the Parent...</H1>");
while(!feof(pFile))
{
fgets(cBuf, 256, pFile);
printf("%s", cBuf);
}
_pclose (pFile);
return 0;
}
/* Child.c -- This is the child process created by Parent */
int main(int argc, char *argv[])
{
printf("<H1>Hello, I'm the child.</H1>");
return 0;
}
Keywords: kbhowto kbwebserver kbcgi KB194948