16 Creating and Accessing Memory Storage Objects
Q3MemoryStorage_New
function to create a new memory storage object.
TQ3StorageObject Q3MemoryStorage_New ( const unsigned char *buffer, unsigned long validSize);buffer
A pointer to a buffer in memory, orNULL
.validSize
The size, in bytes, of the valid metafile data contained in the specified buffer. Ifbuffer
is set toNULL
, this parameter specifies the initial size and also the grow size of the buffer that QuickDraw3D allocates internally.
Q3MemoryStorage_New
function returns, as its function result, a new memory storage object associated with the data in the buffer specified by the buffer
and validSize
parameters. The data in the specified buffer is copied into internal QuickDraw3D memory, so you can dispose of the buffer if Q3MemoryStorage_New
returns successfully.
If you pass the value NULL
in the buffer
parameter, QuickDraw3D allocates a buffer of validSize
bytes, increases the buffer by that size whenever necessary, and later disposes of the buffer when the associated storage object is closed or disposed of. If buffer
is set to NULL
and validSize
is set to 0, QuickDraw3D uses a default initial buffer and grow size.
If Q3MemoryStorage_New
cannot create a new storage object, it returns the value NULL
.
kQ3ErrorOutOfMemory
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker