pdcomm_gem300_capability_snapshot_profile_id_copy
Function
Copies the identifier of one snapshot profile.
PdcommStatus pdcomm_gem300_capability_snapshot_profile_id_copy(const PdcommGem300CapabilitySnapshot *snapshot, size_t profile_index, char *output, size_t capacity, size_t *required)*required is cleared before the handle and index are validated and receives the exact identifier length for a valid profile. A short buffer is left untouched. The identifier is not NUL-terminated. Pass NULL and a capacity of zero to query the length.
Parameters
| Name | Description |
|---|---|
snapshot | Live snapshot. |
profile_index | Zero-based profile index. |
output | Destination; may be NULL for a size query with capacity 0. |
capacity | Size of output in bytes. |
required | Receives 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 profile_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.