Richard Burmeister wrote:
>
> I don't know why you think the 1st parameter is a problem.
>
> SysCopyStringResource(string, theID);
>
> is basically the same as
>
> MemHandle h = DmGetResource(strRsc, theID);
> Char * string = MemHandleLock(h);
How could that be "basically the same"?
The latter form directly accesses the locked resource, the former one
copies its contents into a buffer to be prepared by the programmer. Since
it is not documented how the programmer can find out about the minimal size
of that buffer, buffer overruns can't be avoided. I have thus decided that
SysCopyStringResource is unusable and to use the latter form.
> The thing I thought was odd was that DmGetResource expects a UInt16 for
> theID, while SysCopyStringResource expects an Int16.
Yes, I got that, and I agree with you that it's wrong.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/