Returns the UDT in its serialized format and 0 if the operation was successful, -1 otherwise.
int FNC_UdtSerialize (UDT_HANDLE udt, BYTE *buffer, FNC_LobLength_t num_bytes, FNC_LobLength_t *actual_length)
- the handle of the UDT.
- the user-allocated buffer that will contain the serialized data.
- the number of bytes to read.
- the actual number of bytes that were written to the buffer.
Before calling this function, do the following:
- Call FNC_UdtGetSerializeSize to get the size of the UDT in its serialized form.
- Use the size returned by FNC_UdtGetSerializeSize to allocate a buffer that will hold the serialized data. The size of the buffer must be large enough to hold all of the serialized data, which must be read in a single call to FNC_UdtSerialize.
- Pass this buffer to FNC_UdtSerialize.
The query will fail if the UDT does not support serialize/deserialize.