Palmphi  & CPDB



To use CPDB in your Palmphi application follow these steps (Palmphi 1.43b or newer is required) :

1. At the top of the first source code window write :
#include "CPDBSTD.h"
CPDB_USELIB
2. In the handler for TApplication.OnStart write :
          CPDB_OPENLIB
3. In the handler for TApplication..AfterDestroy write :
          CPDB_CLOSELIB

Done!

After doing this the minimum program should look like this :

#include "CPDBSTD.h"
CPDB_USELIB


EVENT pdb_reader_OnStart(EventPtr event)
{
   CPDB_OPENLIB
}

EVENT pdb_reader_AfterDestroy(EventPtr event)
{
   CPDB_CLOSELIB
}


You will need the file CPDBSTD.h in your project directory. If you are planning to use CPDB in several projects, you may consider copying it to the include directory in cygwin (($CYGWIN)/m68k-palmos/include and using
#include <CPDBSTD.h>
CPDB_USELIB
instead.