Q3MemoryStorage_New
You can use theQ3MemoryStorage_Newfunction 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, or
NULL.validSize- The size, in bytes, of the valid metafile data contained in the specified buffer. If
bufferis set toNULL, this parameter specifies the initial size and also the grow size of the buffer that QuickDraw 3D allocates internally.DESCRIPTION
TheQ3MemoryStorage_Newfunction returns, as its function result, a new memory storage object associated with the data in the buffer specified by thebufferandvalidSizeparameters. The data in the specified buffer is copied into internal QuickDraw 3D memory, so you can dispose of the buffer ifQ3MemoryStorage_Newreturns successfully.If you pass the value
NULLin thebufferparameter, QuickDraw 3D allocates a buffer ofvalidSizebytes, increases the buffer by that size whenever necessary, and later disposes of the buffer when the associated storage object is closed or disposed of. Ifbufferis set toNULLandvalidSizeis set to 0, QuickDraw 3D uses a default initial buffer and grow size.If
Q3MemoryStorage_Newcannot create a new storage object, it returns the valueNULL.ERRORS
kQ3ErrorOutOfMemory