Creating a Minimal Sales Conduit

Using Visual C++ and the development kit, only a few steps are required to create a minimal conduit. We assume that you’ve installed the CDK on your C: drive in the \CDK folder. Let’s walk through the steps.

Note

The final 3.0 version of the CDK promises a Conduit Wizard, which may make this creation process even easier.

  1. Create a new project of type MFC AppWizard (dll) (see Figure 11.4).

  2. Specify that the project is a regular DLL using the MFC shared library as shown in Figure 11.5.

  3. Add the Conduit SDK’s include directory to the list of places the compiler searches for include files. To do this, after you’ve created the project, open the Project Settings dialog and, in the C/C++ settings panel (see Figure 11.6), add the following to the Project Options area:

    /I "C:\CDK\INCLUDE"
  4. Add needed libraries to the project in the Link panel of the same dialog (see Figure 11.7). For this minimal conduit, you need to add three libraries, one containing entry points for logging, one containing entry points for the HotSync dialog, and the last containing entry points for the Sync Manager initialization/deinitialization:

    C:\CDK\lib\hslog20d.lib 
    C:\CDK\lib\pdcmn21d.lib 
    C:\CDK\lib\sync20d.lib

If you edit the Win32 version of your DLL, link with the nondebug versions of the libraries (hslog20.lib, pdcmn21.lib, and sync20.lib).

A new MFC AppWizard project for our do-nothing minimal conduit

Figure 11-4. A new MFC AppWizard project for ...

Get Palm Programming: The Developer's Guide 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.