pub unsafe extern "C" fn FspServiceRunEx(
    ServiceName: PWSTR,
    OnStart: FSP_SERVICE_START,
    OnStop: FSP_SERVICE_STOP,
    OnControl: FSP_SERVICE_CONTROL,
    UserContext: PVOID
) -> ULONG
Expand description

Run a service.

This function wraps calls to FspServiceCreate, FspServiceLoop and FspServiceDelete to create, run and delete a service. It is intended to be used from a service’s main/wmain function.

This function runs a service with console mode allowed.

@param ServiceName The name of the service. @param OnStart Function to call when the service starts. @param OnStop Function to call when the service stops. @param OnControl Function to call when the service receives a service control code. @return Service process exit code.