Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 16 - Storage Objects / Storage Objects Reference
Storage Objects Routines / Creating and Accessing Memory Storage Objects


Q3MemoryStorage_Set

You can use the Q3MemoryStorage_Set function 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 buffer is set to NULL, this parameter specifies the initial size and also the grow size of the buffer that QuickDraw 3D allocates internally.
DESCRIPTION
The Q3MemoryStorage_Set function sets the data for the memory storage object specified by the storage parameter to the values specified in the buffer and validSize parameters. The data in the specified buffer is copied into internal QuickDraw 3D memory, so you can dispose of the buffer if Q3MemoryStorage_Set returns successfully.

If you pass the value NULL in the buffer parameter, QuickDraw 3D 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, and if the buffer parameter was set to NULL when the storage object was created, QuickDraw 3D uses a default initial buffer and grow size.

SPECIAL CONSIDERATIONS
You must not use Q3MemoryStorage_Set with an open memory storage object.

ERRORS
kQ3ErrorAccessRestricted
kQ3ErrorInvalidObjectParameter


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help