Converting Existing CGI Scripts to ISAPI Extensions

This section explains the basic requirements for converting existing CGI script-executable files to ISAPI extension DLLs. As with other DLLs, Web server applications must be thread-safe. More than one client will be executing the same function at the same time, so the code should follow safety procedures in modifying a global or static variable.

You can keep your ISAPI extension thread-safe by using appropriate synchronization techniques, such as creating critical sections and semaphores. For additional information on writing thread-safe DLLs, see the documentation in the Platform SDK and in the Microsoft Development Library.

There are several structural differences between an ISAPI extension and a CGI executable file. An ISAPI extension: