bindrv_getdata
bindrv_getdata |
Purpose
Get the value of a data block token.
Synopsis
int bindrv_getdata(s_bindrvctx bctx,void **val, size_t *size);
Arguments
bctx
|
A BinDrv reader context
|
val
|
Pointer to return a reference to the data buffer
|
size
|
Pointer to return the size of the data buffer
|
Return value
0 if successful, a negative value in case of error or the type code of the token (positive value) if it is not of the expected type.
Further information
1. The returned buffer is allocated using the C function
malloc. To replace this default memory allocator, (
e.g. by some application specific memory management routine), use
bindrv_setalloc.
2. The buffer reference will be
NULL and the size will be
0 when an empty block is encountered.
Related topics