The function ConnectKernel establishes a connection to the D2000 Server and must be called before use of executive functions of the interface D2000 ObjApi. The function also initialises internal variablesof the D2000 ObjAPI according to its start parameters.
Declaration
APIRET _stdcall ConnectKernel(NewValueProc proc, unsigned short timeout);
Parameters
The parameter proc is pointer to the function NewValueProc, which will handle the message NewObjectValue, notifying a change of an object value. The parameter timeout defines a maximal time [sec] how long the function waits for establishing connection. If the value of the parameter timeout is zero, the function waits infinite. This value will be used later for another executive functions as a maximal response wait time (except the functions ListOfObjects, GetArchivData, GetLogData where is defined own timeout).
Return code
Code
Description
API_OK
It signalizes a correctly established connection to the D2000 Server.
API_TimeoutError
The D2000 Server is running, but the connection was not established in the given time.
Pridať komentár