Menu

Resource database

Help
aru
2006-11-22
2013-03-22
  • aru

    aru - 2006-11-22

    Hi, is there any way to write a resource database into the palm? i wanna create a database of bitmaps, but i don't know if only setting up a pfgPalmRemoteTable with one custom field of size=0 will make the pdb as 'resource' instead of 'record'.
    anyway the main problem is that i don't know how to write the bitmap into the field, since the variants as treated as strings and strings can't contain zeros and my bitmaps do...

    i'm so confused!

    if only i had the pointer-size parameters in the writefield event i think i could pull it off

    God bless you Paul!!! your components are amazing!!!

     
    • Paul Gilbert

      Paul Gilbert - 2006-11-24

      Hi there,

      That's a good question; I'm not exactly sure what the format of a .PRC file is. Certainly you can create a .PDB file containing your images - as you suggest, it merely requires defining a single custom field, and having your read and/or write image routine parse the raw data for the image and save it.

      To handle the raw data of the bitmap, use the OnWriteField event - define the out Data parameter as a Variant array of Byte, as in:
        Data := VarArrayCreate([0, SizeNeeded - 1], varByte);

      You can then set each index of your data array to a particular byte. If you want to write out multiple bytes at once, you may want to use VarArrayLock/VarArrayUnlock, which allows you to access to the raw memory representing the array.

      Paul.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.