Hi. 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? :) There is also a minor problem with DmFindResourceType: The result section says: "Index of resource in resource database, or -1 if not found." However the return value from DmFindResourceType should be UInt16. If I use a UInt16 or Int16 to catch it, it will be fine. But, what if someone uses a UInt32 or Int32 variable to get it? :) To be more accurate, should it be "...return 0xFFFF if not found."? Max __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
