Component Code Generation
We can now use the PIDL compiler to generate C++ skeleton module and component code from the MDX and IDX files we created previously. From the skeleton code, we can compile either a Windows DLL, using Visual C++, or a PRC file, using Metrowerks’ CodeWarrior.
With a DLL, you can write a simple Visual C++ driver program to test on Windows before deploying it to the Palm as a PRC file. More importantly, you can incorporate your component into an AppForge Visual Basic application and test it on Windows before deploying the component and the application to the Palm. Piedmont’s dual DLL/PRC nature is what makes it such a powerful SDK.
In this section, we use the PIDL compiler to
generate the skeleton code for the TagParse
component and compile it as a Windows DLL. Before getting started,
configure Visual C++ so it can find the various files associated with
the Piedmont SDK. From the Visual C++ main menu, select
Tools
→
Options
to bring up the Options
dialog. Click on the Directories
tab. Assuming the
Piedmont SDK is installed in C:\Program Files\AppForge\SDK, add the directories
shown in Table 9-7.
Table 9-7. Visual C++ Piedmont SDK directories
File type |
Directories |
---|---|
Include files |
|
| |
Library files |
|
Executable files |
|
Next, create a Win32 DLL project called
ParseServer
in the
ParseServer ...
Get Programming Visual Basic for the Palm OS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.