There are only a couple of traps to patch for writing... but I sure hope you
know what you are doing...!!

DmWrite and DmSet are the main two... others (like DmStrCopy) call
DmWrite... and I sure hope you know what you are doing...!!

To patch a trap use SysSetTrapAddress... but I sure hope you know what you
are doing...!!

Patching reads is harder because an application typically reads a database
record via a pointer retrieved after a DmQueryRecord/MemHandleLock
combination (other combinations exist!). You would have to patch
DmQueryRecord (and DmGetRecord) - then when an app makes a call, get the
real database record, decrypt it into a secondary database, and return a
handle to that decrypted data. Get's messy when an app tries to write back
to that retrieved pointer... :-)

Also be aware that this trap patching mechanism goes away with OS 5... and I
can't see any notifications to replace it in your scenario...


Gavin.

Andrey Belkin <[EMAIL PROTECTED]> wrote in message
news:96695@palm-dev-forum...
>
> How to hook pdb read/write? Is it possible for Flash Memory read/write?
> I want to hook all read/write operations with Flash Memory from all
> application to encrypt/decrypt all the data on-fly as applications read or
> write it. So the Flash Memory will contain only securely encrypted data.
> Are there any differences in implementation under different devices? For
> example: palm, handspring and so on...
>
>
>
>



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

Reply via email to