Please enable JavaScript to view this site.

Bug Validator Help

Navigation: Working with IIS and Services

Example ISAPI Source Code

Scroll Prev Top Next More


Where to put your code


When you use the functions to load and unload Bug Validator from your service, it is important that you put the function calls in the correct place in your ISAPI extension.


Typically, this means that Bug Validator is:


loaded as the first action in the GetExtensionVersion() function of your ISAPI extension.

unloaded in the TerminateExtension() function of your ISAPI extension.

Example source code


The source code shown below shows an example GetExtensionVersion() and an example TerminateExtension() used in an ISAPI, demonstrating where to load and unload Bug Validator.


This example code logs errors. We strongly recommend that you do this in your example. Because IIS is a protected process that can't communicate to the outside world except via HTTP/HTTPS when anything fails during the loading and start of Bug Validator the only means we have of communicating that failure to you is via the log file. Please use the log file, it will make debugging any mistakes very much easier, simpler and quicker than any other method.


This process is almost identical to working with a regular service, except that svlBVStub_StartBugValidator() is replaced with svlBVStub_StartBugValidatorForIIS().


This example assumes the web root is located C:\\testISAPIWebsite