At 18:32 2003-2-14 -0800, you wrote:
Hey folks. I might be delirious at this point, but I've stumbled across something pretty weird in ExgDBRead()'s fifth parameter, 'cardNo'. The header file and OS source code treat it as an input parameter, but the API treats it as an output parameter.
1) The PalmOS Programmer's API Reference, p. 1141, states that the 'cardNo' parameter is a UInt16, but indicates that it is an OUTPUT parameter with the little <- arrow:
<- cardNo The number of the card on which the database was stored by ExgDBRead
The ExgMgr.h header collaborates that it's a UInt16. I would expect it to be a UInt16* if it were an output parameter.
It really is an input parameter. The documentation is in error.
Despite what the documentation says, you want to be damned sure that you pass in a valid card number (0) as this 'cardNo' parameter to ExgDBRead() or else it will crash with a "memoryMgr.c, Line:1409 Invalid card#".I think you may be the first to notice this... I guess everyone else just passed "0" to this and didn't even realize the docs were wrong.
Am I the only person to notice this, or am I indeed delirious at this point and need to sleep?
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
