I’m the proud owner of a Palm Tungsten E2 device. It’s amazing how this old device is still much better then newer mobile windows devices. It has great battery life, quick response time and easy to use PIM.
And it seems I’m not only one that thinks so – you can read about it download squad – Pokin’ to the oldies: why Palm OS 5 still rocks
About a year ego I needed to sync between an application I had on my PC to an application on my Palm device and so I’ve written a library in C# that can read and write pdb (palm database) files.
Like many other projects I forgot about it and left it half complete. A few days ago I stumbled upon it while searching my old C# projects directory and found it. And It seemed a shame to loose code I’ve worked on and that could benefit my follow coders.
Palm OS uses pdb files to store application related data. you can download the palm file format specification from here.
The PDB is combined from four logical part:
- Header that describe the file properties and attributes.
- Record list that defines the structure of the raw data.
- Raw data block.
- SortInfo and AppInfo blocks
In my code you can see the following:
- PDBFile – class that represents an actual pdb file.
- PDBHeader – has all header related information.
- RecordList – contains all record related information and a collection of RecordEntry that contains the raw data information.
- SortInfo & AppInfo – should have hold that information but I haven’t implemented them yet.
I only properly implemented and tested reading from pdb file, writing pdb file is only partly implemented (and poorly tested) or as my calculus lecturer use to say when he didn’t want to solve a problem – I’m leaving it as an exercise to the readers (you?).
How To Run
I’ve included a (very) simple winform project that has simple load/save functionality.
That’s it – The source code is available here.
in case you have questions or improvements please leave a comment.