Function ziAPIModGetString#

ZIResult_enum ziAPIModGetString(ZIConnection conn, ZIModuleHandle handle, const char *path, char *buffer, unsigned int *length, unsigned int bufferSize)#

gets the null-terminated string value of the specified module parameter path

This function is used to retrieve module parameter values of type string.

See also

ziAPIModGetInteger, ziApiModGetDouble

  • conn[in] Pointer to the ziConnection with which the value should be retrieved

  • handle[in] The ZIModuleHandle specifying the module to get the value from.

  • path[in] The path of the module parameter to get data from.

  • buffer[out] Pointer to a buffer to store the retrieved null-terminated string

  • length[out] Pointer to an unsigned int which after the call, contains the length of the retrieved data (including the null terminator). If the length of the passed buffer is insufficient, the value is modified to indicate the required minimum buffer size and ZI_ERROR_LENGTH is returned.

  • bufferSize[in] The length of the passed buffer


  • ZI_INFO_SUCCESS on success

  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred

  • ZI_ERROR_LENGTH if the path’s length exceeds MAX_PATH_LEN

  • ZI_ERROR_COMMAND on an incorrect answer of the server

  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server

  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the path

  • ZI_ERROR_TIMEOUT when communication timed out

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