Try something like this (this is off the top of my head, so please forgive any
mistakes):
Boolean HasHostControl()
{
UInt32 value
if (FtrGet('pose', 0, &value) == errNone)
{
// HostControl functions always implemented under the Emulator
return true;
}
if (!hasHostControl)
{
// HostControl trap was first added in 3.0. Check that
// it's actually implemented. Check the OS version number
// first, because SysGetTrapAddress doesn't always behave
// well on pre-3.1 systems
if (GetOSVersion() >= kVersion30)
{
void* addr1 = SysGetTrapAddress(sysTrapHostControl);
void* addr2 = SysGetTrapAddress(sysTrapSysUnimplemented);
return (addr1 != addr2);
}
}
return false;
}
Boolean HasHostGetHostID()
{
Boolean hasHostGetHostID = false;
if (HasHostControl())
{
// OK, we know the HostControl dispatch trap is implemented.
// Call into it to see if HostGetHostID is implemented.
hasHostGetHostID = HostSelectorImplemented(hostSelectorGetHostID);
}
return hasHostGetHostID;
}
-- Keith Rollin
-- Palm OS Emulator engineer
Doug Morrison <[EMAIL PROTECTED]> on 11/04/99 10:48:08 AM
Please respond to [EMAIL PROTECTED]
Sent by: Doug Morrison <[EMAIL PROTECTED]>
To: "'palm-dev-forum @3com.com'" <[EMAIL PROTECTED]>
cc: (Keith Rollin/HQ/3Com)
Subject: First ROM Version to support HostGetHostID()
All,
Does anyone know what the first ROM Version supports the HostGetHostID()?
Thanks,
-Doug