Palm OS string length constants
PalmSource's Ken Krugler posted a useful bit of info on palm-dev-forum about the constants in the Palm OS header files that tell you minimum lengths for various strings. I've quoted it below with permission from Ken:
Palm OS is unfortunately very inconsistent about naming conventions for limits, but in general if the define is named xxxLen then it's the maximum string length, and you need to add one for the null byte, whereas if it's xxxSize then that includes the null.
Some exceptions to the naming convention I describe above include:
- dmCategoryLength is 16, not 15
- maxCurrencyNameLen is the buffer size
- dmDBNameLength is the buffer size
- dmMaxVersionStrLength is the buffer size
- timeStringLength is the buffer size
- userNameLen includes the null
- pwdLength is the buffer size
- countryNameLength is the buffer size
- SysStringByIndex's maxLen parameter is the buffer size
Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.
The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

qwertYAK / frobnovich
|