Registers a service manager with the Natural Access dispatcher at initialization time.
DWORD dispRegisterServiceManager (const char *svcmgrname, CTASVCMGR_FNS *svcmgrfns, const CTAINTREV_INFO *previnfo)
|
Argument |
Description |
|
svcmgrname |
Pointer to the name of the service manager. |
|
svcmgrfns |
Pointer to the service manager binding functions. This structure has the following definition: typedef DWORD (NMSSTDCALLPTR PFUNC)(); |
|
previnfo |
Pointer to the service manager revision information structure containing the following fields: typedef struct |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_ALREADY_DEFINED |
Service manager that you are trying to register is already defined. |
|
CTAERR_ALREADY_INITIALIZED |
ctaInitialize was already called by the application. |
|
CTAERR_BAD_ARGUMENT |
Required pointer argument is NULL. |
|
CTAERR_INCOMPATIBLE_REVISION |
Service manager is incompatible with the revision of Natural Access that is being used. |
|
CTAERR_OUT_OF_MEMORY |
Unable to allocate memory for the queue, the driver, or the context. |
dispRegisterServiceManager is called by a service manager at initialization time to register a service manager and its binding functions with the Natural Access dispatcher. Once this is done, the service manager is completely specified from the point of view of Natural Access.
The only exported entry that must be provided by the service manager DLL is xxxInitializeManager (for example, vceInitializeManager for the Voice Message service). xxxInitializeManager is called by ctaInitialize the first time the service manager is loaded into the process address space. After the service manager is registered with Natural Access, xxxDefineService is invoked on all the services managed by the service manager and is listed in the arguments to ctaInitialize.
Binding functions can be specified as NULL in the list provided to the dispatcher. In this case, the dispatcher substitutes its own default binding function for the missing service manager binding function. These default binding functions translate to no operations and allow the dispatcher to always call a binding function whether one is specified by the service manager or not.