Slide 6.16: The hello-world Palm program
  Slide 6.18: Line-by-line anatomy of Hello.c (cont.)
  Home


Line-by-line Anatomy of Hello.c


#include <PalmOS.h>
PalmOS.h is an include file that contains most of the standard Palm OS include files. It is from the Palm SDK and contains the needed reference materials for us to use the Palm API and its defined constants.

UInt32 PilotMain(UInt16 cmd, void *cmdPBP, UInt16 launchFlags) {
The function PilotMain( ) is equivalent to the main( ) procedure of C. It returns errNone if the application processed the launch code successfully, or an appropriate error code if there was a problem. The arguments are somewhat similar to C's They specify which event fired the application.