Convert between binary and string universally unique identifiers (UUIDs).
Standard C Library (libc.a)
#include <uuid.h>
void uuid_to_string(uuid, uuid_string, status )
void uuid_from_string(uuid_string,uuid, status)
uuid_p_t uuid;
unsigned_char_p_t *uuid_string;
unsigned32 *status;
The uuid_to_string subroutine converts a binary UUID to a string UUID. The uuid_string parameter should point to an area of memory with enough space to store the string UUID, otherwise the results are undefined. If a NULL value is passed as the second argument of the uuid_to_string parameter, the required memory will be automatically allocated by calling the malloc subroutine. The uuid_from_string subroutine converts a string UUID to a binary UUID. The length of the string passed to the uuid_from_string parameter should be 0 or the length of UUID_C_UUID_STRING_MAX . On successful completion, uuid_s_ok is stored in the location pointed to by the status parameter.
Item | Description |
---|---|
uuid | Points to the location containing the binary UUID |
uuid_string | Points to the location containing the string UUID |
status | Points to the location where the status of the operation is stored |
There are no return values, however, in case the string passed to the uuid_from_string subroutine is invalid, the location pointed to by the status parameter is set to uuid_s_invalid_string_uuid. If a NULL value is passed to the uuid_to_string subroutine as the second parameter and the system has run out of memory, the location pointed to by the status parameter is set to uuid_s_no_memory.