dmi_decoder_get_bytes

Synopsis

#include <opendmi/decoder.h>

bool dmi_decoder_get_bytes(dmi_decoder_t *decoder, void *ptr, size_t length);

Description

The dmi_decoder_get_bytes function copies length bytes of the structure into ptr and advances the cursor.

Referring to the bytes in place, rather than copying them, is what dmi_decoder_get_binary does.

Parameters

decoder

Decoder to read from.

ptr

Buffer that receives the bytes; must be at least length bytes.

length

Number of the bytes to read.

Return value

true on success, false if there are not enough bytes remaining, or on error.

Errors

DMI_ERROR_ARGUMENT_NULL

ptr is nullptr, while length is not zero.