Ets_Obj_Attr_Symbol_Get_Sized()
Abstract
Retrieves the value of the symbol portion of a symbol map attribute, using a sized buffer.
Syntax
Ets_Obj_Attr_Symbol_Get_Sized (obj_hndl, attr_name, size_ptr, symbol_buf_ptr)
| Argument | Type | Description |
|---|---|---|
obj_hndl |
EtsT_Obj_Handle |
Handle of object of interest. |
attr_name |
const char * |
Name of attribute of interest. |
size_ptr |
size_t * |
On call, the size of val_ptr.On return, the actual size of the attribute symbol (including the terminating null). |
symbol_buf_ptr |
char * |
Returns the value of the symbol. |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if the attribute exists, is symbolic, and is valid. EtsC_Compcode_Failure otherwise.
Header
ets_api_obj.h
Details
This function is similar to Ets_Obj_Attr_Symbol_Get(), except that it has a size argument and will not overrun the symbol_buf_ptr buffer when returning the attribute value. (If size_ptr is NULL, this function acts identically to Ets_Obj_Attr_Symbol_Get().)
If the symbol value is larger than symbol_buf_ptr, a truncated string is returned.
size_ptr allows you to detect buffer-size problems and reallocate the buffer to hold the requested attribute value. See Ets_Obj_Attr_Get_Sized() for an example.