The only thing is there is no "return error" statement in the StartApplication() function. When I put the "return error" as the last statement in the StartApplication function, the application works on the "W".
If you leave off the "return error" statement in StartApplication, then you rely on whatever value happens to be in the D0 register when the function ends as the return value. This can be garbage depending on what code was running in the last OS call.. it's just that on the "W", some non-zero value was left in D0, but on other devices, it had been cleared.
You were just lucky this didn't happen before. I'm also surprised that the compiler didn't catch it -- do you have warnings turned on? CW may only catch this when you optimize the code at level 1 or better; I think the code that detects missing return statements is part of the optimizer.
-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
