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 Memory Validator with NT Services.
The following tasks are performed when the service is started:
•Loads the Memory Validator stub DLL into the service
•Deliberately leaks some memory so that you can see this in the Memory Validator user interface
•Performs the normal work of the service until it's stopped
•Unloads the Memory Validator stub DLL from the service
•Informs the service control manager that a stop is pending
Read more about working with NT Services.