Function ziAPIConnectEx#

ZIResult_enum ziAPIConnectEx(ZIConnection conn, const char *hostname, uint16_t port, ZIAPIVersion_enum apiLevel, const char *implementation)#

Connects to Data Server and enables extended ziAPI.

With apiLevel=ZI_API_VERSION_1 and implementation=NULL, this call is equivalent to plain ziAPIConnect. With other version and implementation values enables corresponding ziAPI extension and connection using different implementation.

See Connection for an example

See also

ziAPIConnect, ziAPIDisconnect, ziAPIInit, ziAPIDestroy, ziAPIGetConnectionVersion

  • conn[in] Pointer to the ZIConnection with which the connection should be established

  • hostname[in] Name of the host to which it should be connected, if NULL “localhost” will be used as default

  • port[in] The number of the port to connect to. If 0 the port of the local Data Server will be used

  • apiLevel[in] Specifies the ziAPI compatibility level to use for this connection (1 or 4).

  • implementation[in] Specifies implementation to use for a connection. NULL selects the default implementation (recommended).


  • ZI_INFO_SUCCESS on success

  • ZI_ERROR_CONNECTION when the Data Server didn’t return the correct answer or requested implementation is not found or doesn’t support requested ziAPI level

  • ZI_ERROR_TIMEOUT when initial communication timed out

  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.