If your program
work with stdin/stdout the easiest way it's first.
You can call your program from url, passing commandline after "?"
myprg.exe?arg1=1&arg2=2&arg3=3
The program must at start output the header:
printf("Content-type: text/html\n\n\n");
then you can get the string in url:
char args[1024];
strcpy(args,getenv("QUERY_STRING"));
You have to strip it in separate var, then replace any urlencode char (eg replace "%20" with " " and so on..).
Then you can reput any result outputting on stdout:
printf("<HTML><BODY><H1>You get right !!!</H1></BODY></HTML>");
see you