Skip to content
Start free evaluation

pdcomm_gem300_capability_snapshot_capability_id_copy

Function

Copies the identifier of one snapshot capability.

PdcommStatus pdcomm_gem300_capability_snapshot_capability_id_copy(const PdcommGem300CapabilitySnapshot *snapshot, size_t profile_index, size_t capability_index, char *output, size_t capacity, size_t *required)

Declared in: #include <pdcomm_gem300.h>

*required is cleared before the handle and indexes are validated and receives the exact identifier length for a valid capability. A short buffer is left untouched. The identifier is not NUL-terminated. Pass NULL and a capacity of zero to query the length.

Parameters

NameDescription
snapshotLive snapshot.
profile_indexZero-based profile index.
capability_indexZero-based capability index within the profile.
outputDestination; may be NULL for a size query with capacity 0.
capacitySize of output in bytes.
requiredReceives the identifier length (0 on validation failure). Must not be NULL.

Returns

#PDCOMM_OK when the identifier was copied; #PDCOMM_BUFFER_TOO_SMALL when capacity is smaller than *required (output untouched); #PDCOMM_INVALID_ARGUMENT when required or snapshot is NULL, or output is NULL with sufficient capacity; #PDCOMM_OUT_OF_RANGE when either index is out of range; #PDCOMM_INTERNAL_ERROR when a panic was contained.

Notes

  • Thread safety: snapshot reads may run concurrently; destruction must be synchronized with them.