At 4:30 PM -0800 11/28/01, Max Bian wrote:
>I was playing with DmNewResource.  The prototype is (from API):
>
>MemHandle DmNewResource (DmOpenRef�dbP, DmResType�resType, DmResID�resID,
>UInt32�size);
>
>I was doing "DmNewResource(dbP, 'JUNK', 0, 0xFF * 10);" repeatly,
>but it didn't complain about the resID numbers were all zeros.  It
>silently increases the index number by one each time I call it.  No
>error is reported by DmGetLastErr().  I guess this is a feature but
>not bug?  But the comment section says:
>
>   "Allocates a memory chunk for a new resource and adds it to the given
>resource database. The new resource has the <<given type and ID>>. ......"
>
>So someone at Palm wants to update the comments to tell the truth? :)

The documentation (as you quoted it) seems accurate: a new resource
with the given type and ID *is* added.  All the resources will have
the same type and ID.  Not very useful, but the documentation you
quoted doesn't say you can't do it.

BTW, at least in Palm OS 3.5, Debug ROMs will display an error dialog
if you add so-called "duplicated resources".

-- Keith

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to