Q3MemoryStorage_Set
You can use theQ3MemoryStorage_Setfunction to set the data of a memory storage object.
TQ3Status Q3MemoryStorage_Set ( TQ3StorageObject storage, const unsigned char *buffer, unsigned long validSize);
storage- A memory storage object.
buffer- A pointer to a contiguous block of memory to be associated with the specified storage object, 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_Setfunction sets the data for the memory storage object specified by thestorageparameter to the values specified in thebufferandvalidSizeparameters. The data in the specified buffer is copied into internal QuickDraw 3D memory, so you can dispose of the buffer ifQ3MemoryStorage_Setreturns 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, and if thebufferparameter was set toNULLwhen the storage object was created, QuickDraw 3D uses a default initial buffer and grow size.SPECIAL CONSIDERATIONS
You must not useQ3MemoryStorage_Setwith an open memory storage object.ERRORS
kQ3ErrorAccessRestricted
kQ3ErrorInvalidObjectParameter
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help