This sample can also be used to aid in debugging. If you have a text file that contains a full http query (for POSTed forms; GET forms are all on the command line) then you can run this program under a debugger to analyze your sample. Please keep in mind that this is not the same environment as running as a service under IIS. Also, this sample, unlike IIS, is single threaded. Another sample to look at is ISmoke - this is a dialog based MFC app to help "smoke" out simple problems in ISAPI DLLs.
To illustrate the usage, here is an example of calling the ISrvMon sample from a CGI exe. cgiwrap.exe was renamed to ISrvMon.exe for this purpose. The following form is identical to the ISrvMon sample, but calls ISrvMon.exe instead. ISrvMon.DLL should, of course, be available for loading.
Note that the process information returned by ISrvMon.Dll is now for the ISrvMon.Exe (CGIWrap) process and not for the INetInfo.Exe (IIS) process.