Up: GEOS SDK TechDocs | Up | Prev: GenCopyChunk() ... | Next: GeodeGetAppObject() ...

GeodeAllocQueue()

QueueHandle GeodeAllocQueue();

This routine allocates an event queue which can then be attached to a thread with ThreadAttachToQueue() . It returns the queue's handle if one is allocated; it will return zero otherwise. This routine is used outside the kernel only in exceptional circumstances.

Be Sure To: You must free the queue when you are done with it; use GeodeFreeQueue() .

Include: geode.h

GeodeDuplicateResource()

MemHandle GeodeDuplicateResource(
        MemHandle mh);		/* handle of geode resource to duplicate */

This routine reads a resource from a geode into a newly-allocated block (allocated by this routine). Any relocations on the resource to itself are adjusted to be the duplicated block. The handle of the duplicated block is returned.

Include: resource.h

GeodeFind()

GeodeHandle GeodeFind(
        const char	* name,			/* geode's permanent name */
        word		numChars,		/* number of characters to match:
				 		 * 8 for name, 12 for name.ext */
	GeodeAttrs	attrMatch,		/* GeodeAttrs that must be set */
        GeodeAttrs	attrNoMatch);		/* GeodeAttrs that must be off */

This routine finds a geode given its permanent name, returning the geode handle if found. If the geode can not be found, a null handle will be returned. Pass it the following:

name
A pointer to the null-terminated permanent name of the geode.
numChars
The number of characters to match before returning. Pass GEODE_NAME_SIZE to match the permanent name, (GEODE_NAME_SIZE + GEODE_NAME_EXT_SIZE) to match the name and extension.
attrMatch
A record of GeodeAttrs the subject geode must have set for a positive match.
attrNoMatch
A record of GeodeAttrs the subject geode must have cleared for a positive match.

Include: geode.h

GeodeFindResource()

word	GeodeFindResource(
        FileHandle	file,			/* geode's executable file */
        word		resNum,			/* resource number to find */
        word		resOffset,		/* offset to resource */
        dword		* base);		/* pointer to second return value */

This routine locates a resource within a geode's executable ( .geo ) file. It returns the size of the resource as well as the base position of the first byte of the resource in the file (pointed to by base ). Pass the following:

file
The file handle of the geode's executable file.
resNum
The number of the resource to be found.
resOffset
The offset within the resource at which to position the file's read/write position.
base
A pointer to a dword value to be filled in by the routine. This value will be the base offset from the beginning of the file to the first byte of the resource.

Structures: A geode's executable file is laid out as shown below.

0:	Geode file header
1:	Imported Library Table
2:	Exported Routine Table
3:	Resource Size Table
4:	Resource Position Table
5:	Relocation Table Size Table
6:	Allocation Flags Table
7+:	application resources

Include: geode.h

GeodeFlushQueue()

void	GeodeFlushQueue(
        QueueHandle	source,			/* source queue to flush */
        QueueHandle	dest,			/* queue to hold flushed events */
        optr		obj			/* object to handle flushed events */
        MessageFlags	flags);			/* MF_INSERT_AT_FRONT or zero */

This routine flushes all events from one event queue into another, synchronously. Pass it the following:

source
The queue handle of the source queue (the one to be emptied).
dest
The queue handle of the destination queue that will receive the flushed events.
obj
The object that will handle flushed events that were destined for the process owning the source queue. If the process owning the destination queue should be used, pass the destination queue handle in the handle portion of the optr and a null chunk handle.
flags
A record of MessageFlags . The only meaningful flag for this routine is MF_INSERT_AT_FRONT, which should be set to flush source queue's events to the front of the destination queue. If this flag is not passed, events will be appended to the queue.

Include: geode.h

GeodeFreeDriver()

void	GeodeFreeDriver(
        GeodeHandle gh);			/* handle of the driver */

This routine frees a driver geode that had been loaded with GeodeUseDriver() . Pass it the geode handle of the driver as returned by that routine.

Include: driver.h

GeodeFreeLibrary()

void	GeodeFreeLibrary(
        GeodeHandle gh);			/* handle of the library */

This routine frees a library geode that had been loaded with GeodeUseLibrary() . Pass it the geode handle of the library.

Include: library.h

GeodeFreeQueue()

void	GeodeFreeQueue(
        QueueHandle qh);			/* handle of queue being freed */

This routine frees an event queue allocated with GeodeAllocQueue() . Any events still on the queue will be flushed as with GeodeFlushQueue() . You must pass the handle of the queue to be freed.

Include: geode.h


Up: GEOS SDK TechDocs | Up | Prev: GenCopyChunk() ... | Next: GeodeGetAppObject() ...