Function ziAPIGetValueStringUnicode#

ZIResult_enum ziAPIGetValueStringUnicode(ZIConnection conn, const char *path, wchar_t *wbuffer, unsigned int *length, unsigned int bufferSize)#

gets a null-terminated string value of the specified node

This function retrieves the newest unicode string value for the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path).

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

  • path[in] Path to the Node holding the value

  • wbuffer[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 or the length of the char-buffer for the nodes given by MaxLen is too small for all elements.

  • ZI_ERROR_COMMAND on an incorrect answer of the server

  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server

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

  • ZI_ERROR_TIMEOUT when communication timed out

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