The Service API allows component writers to create service like components. Users can instantiate new instances of your service and control them through component defined verbs (i.e. Start, Stop). You can provide a custom interface for editing the service instances via the Service UI API.
The API also allows you to programmatically instantiate service instances for services that you wish to control the lifetime of.
If you wish to provide a network style service (Proxy server, mapping service etc) use the NetService API instead. This API provides automatic support for managing bindings, socket notifications, event registration and many other common functions that net based services typically require.
The steps to providing a service are as follows:
- Register a service provider in the WinGate engine with ServiceFRegisterProvider
- Optionally register a type with ServiceFRegisterServiceType for services whose lifetime that you want the WMC to manage and the user to be able to instantiate/destroy.
- Optionally register instances of services you wish to control the lifetime of with ServiceFInstanceRegister
- Register a service provider in the WinGate Management Console with ServiceUIFRegisterProvider
- Respond to interface functions ServiceUIQueryInstantiableType, ServiceUIInstanceCreate and ServiceUIInstanceShowConfig
Verbs
You can define verbs that can be executed on a service instance. These verbs appear in the user interface as tasks and as drop down menu items in the Services panel. When the framework informs you of a verb execution it passes in a bitmask that was defined by you when you registered the verb with ServiceFRegisterProviderVerb