generatePDF DESCRIPTION: This program is to solve the problem with CFExecute being unable to launch HTMLDoc in certain situations due to process memory usage limitations on the Jrun implementation of the exec() system call. SRC: Contains the C source code for the program BIN: Contains the precompiled Win32 exe file Compile: Contains a ZIP of the Digital Mars C/C++ Compiler for Win32, and compilation instructions PROGRAM DOCUMENTATION: The comments in the C file explain line by line what is going on. Basically, the program takes in the query string, which is passed by IIS to the CGI executable in the environment string of the program's memory space. This is standard for all CGI systems. The program obtains a long string of the environment by calling the getenv() function in the stdlib.h file. We then URL-Decode the string by iterating over its length and subsituting any instance of %## with the decimal equivalent of the hex code 0x00## and then converting that decimal to its ASCII character equivalent. We then split the query string to find the contentPath and fileName, which must be specified in this order in the query string for the program to work correctly. It makes note of the locations of the & and both = signs within the string and then does some char pointer math to determine where the substrings need to start and end. These then get copies of the data. A command string cmd is then built with all the arguments for htmldoc, and this is passed to the operating system via the system() call definedi n stdlib.h The OS then spawns a cmd.exe shell, and runs the command string. When it terminates, generatePDF.exe gets control back, frees all dynamically allocated memory and terminates returning error code 0 (success) to the parent process (IIS).