16 Creating and Accessing Memory Storage Objects

16 Q3MemoryStorage_GetBuffer

You can use the Q3MemoryStorage_GetBuffer function to get the data of a memory storage object.

TQ3Status Q3MemoryStorage_GetBuffer (
TQ3StorageObject storage, 
unsigned char **buffer, 
unsigned long *validSize, 
unsigned long *bufferSize);
storage A memory storage object.
buffer On entry, a pointer to a pointer. On exit, a pointer to a pointer to the block of memory associated with the specified storage object.
validSize On exit, the size, in bytes, of the valid metafile data contained in the specified buffer.
bufferSize On exit, the size, in bytes, of the block of memory whose address is returned through the buffer parameter.

DESCRIPTION


The Q3MemoryStorage_GetBuffer function returns, in the buffer and bufferSize parameters, the address and size of the block of memory currently associated with the memory storage object specified by the storage parameter. Note that the returned address is the address of the storage object's data, not of a copy of that data. As a result, the returned pointer may become a dangling pointer if the buffer holding the storage object's data is dynamically reallocated (perhaps because additional data was written to the object).

ERRORS


kQ3ErrorAccessRestricted
kQ3ErrorInvalidObjectParameter

DESCRIPTION
ERRORS

3D Graphics Programming with QuickDraw 3D - 17 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker