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
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
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
numChars
attrMatch
GeodeAttrs
the subject geode must have set for a positive match.
attrNoMatch
GeodeAttrs
the subject geode must have cleared for a positive match.Include: geode.h
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
resNum
resOffset
base
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
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
dest
obj
flags
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
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
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
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
GEOS SDK TechDocs
|
|
GenCopyChunk() ...
|
GeodeGetAppObject() ...