Microsoft Internet Information Server
Lottery - An ISAPI DLL that maintains a persistent worker thread
Lottery.Dll is an ISAPI extension that illustrates how to use a persistent worker
thread, allowing it to run independent of client requests. The worker thread continuously
increments a lottery number, and when a client request comes in, the current lottery
number is sent as a reply. The Lottery sample also illustrates how to change security
tokens and how to use HTTP_STATUS_PENDING.
Steps to build the sample:
- Set the environment variables WWWROOT and WWWSCRIPTS to
point to your c:\inetsrv\wwwroot and c:\inetsrv\scripts directory, respectively.
- Make sure your INCLUDE variable points to both the Win32 SDK and the ISAPI
header files, and make sure your LIB variable points to the Win32 SDK.
- With your PATH variable set to your compiler, run nmake from the command line inside
the Lottery directory.
The build results will be copied to your WWW structure: Lottery.Dll will be copied to
the SDK sub-directory off the path specified in WWWSCRIPTS, and Default.Htm will be
copied to the SDK\Lottery sub-directory off the path specified in WWWROOT.
Try It Out