Bug Validator is shipped with an example service that demonstrates how to call the two functions required to use Bug Validator with NT Services. Full source code and a Microsoft® Visual Studio® project are supplied.
Information about building the example service can be found here.
The example service performs the following tasks when it is started:
•Loads the Bug Validator stub DLL into the service
•Deliberately leaks some memory so that you can see this in the Bug Validator user interface.
•Performs the normal work of the service until the service is stopped.
•Unloads the Bug Validator stub DLL from the service.
•Informs the service control manager that a stop is pending.