carb::crashreporter::OnGetMetadataStringFn

Defined in carb/crashreporter/ICrashReporter.h

using carb::crashreporter::OnGetMetadataStringFn = size_t (*)(char *buffer, size_t maxLength, void *context)

Metadata value callback function prototype.

Parameters
  • buffer[out] Receives the string value. This must be UTF-8 encoded and must not exceed maxLength bytes including the null terminator. This buffer will never be nullptr.

  • maxLength[in] The maximum number of bytes including the null terminator that can fit in the buffer buffer. This will never be 0. It is the callback’s responsibility to ensure no more than this many bytes is written to the output buffer.

  • context[in] The opaque context value that was used when the metadata value was originally registered.

Returns

The total number of bytes not including the null terminator character that were written to the output buffer.