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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access