skip to main content
Embedding OpenAccess SDK Server in .NET applications : Microsoft .NET API : server_start
 

server_start

This function should be called from a thread in the application to start the specified OpenAccess SDK service that has already been configured. The required parameters are passed in as strings in an array of strings. This function will not return control back to the calling thread until either the service is stopped using the server_stop call or an issue occurs in starting the service. Once the service is started, it behaves just as if it was started as a standalone server.
int server_start(int argc, string[] args)
 
Table 250: Parameters for server_start
Parameter
Type
Description
IN
 
 
argc
int
Number or arguments passed into the args string array.
args
string[]
Array of strings that represent the arguments for the server_start command.
args[0] – a string indicating the name of the application
args[1] - -datamodel – indicates that the next argument specifies the path of the configuration file.
args[2] -<datamodel>
where <datamodel> is replaced with the file name, including path, of the OpenAccess SDK Server configuration file oadm.ini.
args[3] - -servicename – indicates that the next argument specifies the OpenAccess SDK service name.
args[4] -<servicename>
where <servicename> is replaced with the OpenAccess SDK service name that is configured in the configuration file specified by the –datamodel argument. For example, OpenAccessSDK810_C.
RETURN
 
 
 
int
0 – Service has been started
All other return values – see the following table
Table 251: Error Codes
Error Code
Reason
0
Success
10
oasoa.dll is started without the required command arguments
11
The –servicename or -n option is missing servicename argument
12
The –connectmodel or -m option is missing an argument.
13
The –sessionid option is missing an argument.
14
The -connectinfo option is missing an argument.
15
The –datamodel or –d option is missing an argument.
16
The –msgfile or –g option is missing an argument.
17
The required servicename is missing.
18
Invalid value for connection model passed
21
Cannot open the message file
22
Cannot open the configuration file
23
Configuration file has incorrect version
24
Servicename name not found in configuration file
25
ServiceMessageFile attrbute not set in configuration file
30
Failed to Build MGSS mechanism map from DM and create MGSS factory
31
Failed to initialize the EventQueue Cache
32
Failed to create the Core Service component
33
Failed to create the Scheduler component
34
Failed to create the Event Processor component
35
Failed to initialize the Service component
91
Internal error, memory allocation failed.
95
Internal error, fatal server error detected.
When server_start returns with exit code 35, a related error message is written to a Service debug log file in the logging subdirectory. For all other exit codes, a related error message is sent to the Windows Application log. Use the Event Viewer to read the Windows Application log. For all other exit codes, a related error message is sent to the Windows Application log. Use the Event Viewer to read the Windows Application log.