of_start

This function is called in response to the service being started by the Service Control Manager. It is also called when the service has been started automatically at system startup.

Arguments:

None

Return:

ERROR_SUCCESS - processing was successful

ERROR_FUNCTION_FAILED - an error occurred and the service should stop

Usage:

This is where you put the service's initialize code. If your service uses a database, you would connect to it here.