API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IVFSNODE_SETDATABUFFER()

Brew Release
Brew MP 1.0.2
See Also
IVFSNODE_SetProperty()
Description
Sets the address of the data buffer of String and Data type nodes.
Params
po
[]:
[in] Pointer to the IVfsNode interface object
buf
[]:
[in] The new data buffer to be used by the node
Interface
  • IVFSNODE
Prototype
  •    int IVFSNODE_SetDataBuffer(IVfsNode * po,void * buf)
    
Return
  •    SUCCESS, or standard error code.
    
Side Effect
  • Calling this function on a node that was created with a non-zero size will waste the original buffer memory. Note, however, that the original buffer memory WILL be freed when the node is deleted.
Comments
Inline accessor for IVFSNODE_SetProperty(..., NODEPROPERTY_TYPE) Only valid for NODETYPE_STRING and NODETYPE_DATA. Other types return an error. This provides an alternate mechanism for setting string and data values: create a string or data node of size 0, then call SetDataBuffer with the address of the value to be assigned. You should always call SetDataBufferSize() immediately after this call. The node DOES NOT take ownership of the buffer, which MUST be freed separately to the destruction of the node.