I am building an app that uses a C library as well as a C++ library.
I have not worked with C++ before and I am having trouble casting with it.
For example for PilotMain:
UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
I nedd to cast cmdPBP as ShellRunParams
typedef struct {// Shell Library calling convention from PDAT, MUST match the
typedef in NADA.C
UInt16 AppCardNo;// Application's Memory Card
LocalID AppLID;// Application's DB ID
DmResID FormID;// Current Form ID (MAY BE WRITTEN TO!)
DmResID ActsID;// Current Action ID that triggered this
UInt16 OpenCardNo;// DB Memory Card if open
LocalID OpenLID;// DB ID if open
Int16 OpenRec;// Current Record if open (MAY BE WRITTEN TO!)
} ShellRunParams;
With C a pointer to ShellRunParams was considered a void * which is the same as
MemPtr.
Also I am not sure to what extent I can use both C and C++ in a single CW 9
project. Personally I prefer C only because I have used it for a while but I
have to use C++ because of one of the librarys I am using.
Thanks
Greg
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/