Gestalt under ROMlib | ||
---|---|---|
<<< Previous |
ARDI has added one special gestalt selector, gestaltPHYSICAL ('MUL8'). It returns the address of a routine that behaves just like Gestalt, but provides access to a completely different set of tables. These tables contain information about the environment in which Executor is running instead the emulated environment that Executor provides.
Example:
int PhysicalGestalt (long selector, long *responsep) { int retval; pascal int (*physfp) (long sel, long *responsep); retval = Gestalt ('MUL8', (void *) &physfp); if (retval == noErr) retval = physfp (selector, responsep); return retval; } ... OSErr err; long vers; err = PhysicalGestalt ('sysv', &vers); /* err should be noErr and vers should be the version of Executor you're running, not the version of the System file we're emulating */ |
These are the PhysicalGestalt selectors supported:
Table 1. PhysicalGestalt Selectors
Name | Value | Response |
---|---|---|
gestaltSystemVersion | 'sysv' | numeric version of Executor |
gestaltExecutorVersionString | 'xqtr' | address of the string version of Executor |
gestaltDemoStatus | 'demo' | 1, if this is a demo version |
gestaltDemoExpiration | 'xpir' | how many days until the demo expires |
gestaltSerialNumber | 's/n ' | non-demo version: serial number |
gestaltRegisteredName | 'name' | non-demo version: name |
gestaltRegisteredOrg | 'org ' | non-demo version: organization |
gestaltPhysicalRAMSize | 'ram ' | amount of physical ram on the machine |
gestaltScreenSize | 'scrn' | resolution of the monitor |
gestaltGhostScriptVersion | 'gost' | win32 only: Ghostscript DLL version |
ARDI is willing to add PhysicalGestalt selectors as Mac developers require.
<<< Previous | Home | |
Gestalt under ROMlib |