C++
Acad::ErrorStatus getBinaryData( const ACHAR* key, Adesk::Int32& size, char*& data ) const;
Description
This function reads a chunk of binary data from this object's extension dictionary. It assumes that the data has been stored as a resbuf chain of 127-byte pieces, which it concatenates into the larger data buffer that is returned. If the data has been stored in any other type of resbuf, this function returns eBadDxfCode.
A null pointer should be passed to the data parameter. If this function succeeds, it allocates the appropriate memory to contain the requested data, copies the data into the memory, sets data to point to that memory, and returns the size of the data in size.
The caller is responsible for freeing the allocated data buffer. The caller also is responsible for opening the object for read.
Parameters
Parameters | Description |
---|---|
key | Input extension dictionary key under which the data is stored |
size | Output size of the returned data in bytes |
data | Output requested data in an allocated buffer |
Returns
Returns Acad::eOk if successful. Returns Acad::eBadDxfCode if data is stored in resbufs that are not binary data chunks.
Links
Previous Declaration
Acad::ErrorStatus getBinaryData(const ACHAR * key, Adesk::Int32 & size, char *& data) const;
Acad::ErrorStatus getBinaryData(const ACHAR * key, long & size, char *& data) const;