As well as the example application, an example service is provided along with details about building it.
There's also an example client.
The example service demonstrates how to use the NT Service API to call the two functions required to use Performance Validator with NT Services.
The following tasks are performed when the service is started:
•Loads the Performance Validator stub DLL into the service
•Performs the normal work of the service until it's stopped
•Unloads the Performance Validator stub DLL from the service
•Informs the service control manager that a stop is pending
Read more about working with NT Services.