>"Norris Pouhovitch" <[EMAIL PROTECTED]> wrote in message
>news:45334@palm-dev-forum...
>> Here is a breaf description of what I have noticed, I was trying to return
>> a constant 0x8002 back and I was expecting the returned value to be set to
>> 0x00008002 since the returned value is UInt32, however my expectations
>were
>> absolutely wrong, instead I was getting back 0xFFFF8002
>
>I'm not a C guru, but it sounds like a 16-bit signed value is being sign
>extended to generate a 32-bit signed value.
>--
>Danny Epstein
>OS Engineer, Palm Inc.
Yes...there appears to be a bug in the ROM. SysAppLaunch calls a
utility function to safely invoke the targeted application. This
intermediate function converts the UInt32 returned by the application
into an Int16. When SysAppLaunch stores this Int16 back into the
SysAppLaunch caller's UInt32, the sign-extension Danny talks about
comes into play.
At 5:23 PM -0700 4/10/01, Norris Pouhovitch wrote:
>in order to get around the failed check comparing to 0x8002
>I did this
> // this is a get around the 0xFFFF8002
> if ((*(((UInt16*)(&iSysAppLaunch))+1)) == 0x8002)
Or you could just use: "(UInt16) iSysAppLaunch".
--
-- Keith Rollin
-- Palm OS Emulator engineer
P.S. Check out the new e-mail address. [EMAIL PROTECTED] will work
for a while, but anyone mailing me needs to update to the new one
eventually.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/