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.

Param 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. Writing a null terminator is optional.

Param 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.

Param context

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

Return

The total number of bytes not including the null terminator character that were written to the output buffer. This value MUST not exceed maxLength.