Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
InputSprocket Functions / Configuring the Application


ISpElement_NewVirtualFromNeeds

You can use the ISpElement_NewVirtualFromNeeds function to allocate virtual elements for all items in a need structure array.

OSStatus ISpElement_NewVirtualFromNeeds (
	UInt32 count,
	ISpNeed *needs,
	ISpElementReference *outElements
	UInt32 flags);
count
The number of need structures for which to allocate virtual elements.
needs
A pointer to an array of need structures.
outElements
On exit, an array of element references.
flags
Set the kISpVirtualElementFlag_UseTempMem bit to tell InputSprocket to allocate the virtual element in temporary memory. See "Virtual Element Flag" (page 3-23).
function result
A result code.
DESCRIPTION
You pass the ISpElement_NewVirtualFromNeeds function an array of need structures in the needs parameter and the number of those structures in the count parameter. The function returns, in the outElements parameter, the element references for the virtual elements allocated. If you want the virtual elements allocated in temporary memory pass kISpVirtualElementFlag_UseTempMem in the flags parameter.

This function only works if you have built-in element kinds, which are described in "Built-in Element Kinds" (page 3-18). For other element kinds, use the ISpElement_NewVirtual function to create virtual elements.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996