> From: Michael Zapeda [mailto:[EMAIL PROTECTED]]
> I was wondering if it was possible to set strings as features.
>
> char* pData = "hello world";
> FtrSet(MY_APP_CREATOR, 5, (UInt32) pData);
>
> Would this work? My first thoughts tell me that pData has to
> be declared as static, but i'm not really sure.
Not strictly static, but in general the string must remain at the same
address in memory during the lifetime of when the feature may be accessed
and dereferenced. You can do this with static storage, or a locked dynamic
heap chunk, or a locked database record, or a PC-relative string embedded in
a code segment, etc.
But why use a feature at all, if the intent is just to make the string
available to another piece of code in the same application? A global
variable would be far more efficient.
-slj-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/