General Information


Main Index

General Info











When creating a conduit using this class library, you must follow the following steps:

  1. Create a new DLL Project. All Conduits must be DLLs [*].

  2. Create a new datamodule for the project. Then in the implementation section of the datamodule's unit, add the following extra lines:
                DataModule1 := TDataModule1.Create(nil);

    This forces the data module to be created, and thus instantiate the components that you'll drop on it.

  3. Drop a copy of the TpfgPalmComponent onto the data module.

The component takes care of the following details:

  • Registering your conduit - The conduit library provides a COM implementation that allows registration of the conduit as if it were a standard ActiveX DLL. That is, regsvr32 conduit.dll can be used to register the conduit, and regsvr32 /U conduit.dll can be used to unregister it (where conduit.dll is the name of the conduit dll you create).

  • Configuring your conduit - When the user clicks "Configure" from the HotSync Manager's Custom dialog, the OnConfigConduit event will get fired, allowing you to provide conduit configuration to the user. If no event method is provided, then a standard "HotSync Action" dialog will be shown.

  • Execute your conduit - When a conduit is executed, the component's OnExecConduit event is fired, allowing you to provide the actual execution code for your conduit.
For more information on writing the actual guts of the conduit, see the TConduitExecute section.


As mentioned previously, before you can test your conduit, it must first be registered with HotSync. This is a simple matter of going to the MS-DOS prompt, changing to the project directory, and typing:
                regsvr32 conduit_name.dll
If all goes well, then you should receive the following message:
                Call to DllRegisterServer succeeded

If you get any other message, then the likely cause is either that you failed to fill in one the required properties in the TConduitRegister component, or you have previously already registered the conduit. It's worth running the condcfg.exe application to verify not only that the conduit has been registered, but that it has the correct properties associated with it. If any are wrong, you'll need to unregister the conduit, correct the properties in the TConduitRegister component, recompile, and then re-register again.


The book "Palm Programming: The Developer's Guide" [O'Reily press] has a whole chapter on debugging conduits. It includes a complicated process of modifying the DLLs used by the conduit, linking in debug conduit libraries, and running a special debug version of the HotSync program. For Delphi, this is largely unncessary.

All that is required to debug a conduit is to compile the DLL with debug information - a simple setting under Project|Options which is on by default anyway - and specifying the HotSync application in the Host Application edit box of the Run|Parameters dialog. Once this is done, running will launch HotSync, and if the conduit has been properly registered, will allow you to debug your conduit.

It's also advisable to set up the Palm itself for conduit debugging. This involves setting two system properties:

  • "Shortcut - dot - 3" [usually entered in the Find dialog]. This disables the "Auto off" power-down feature, and keeps the Palm running until the next time a reset occurs. On newer Palms, this may not be necessary, since many now come with an automatic charger in the HotSync cradle, and an option to disable the Palm auto-off feature whilst the Palm is plugged into the cradle.

    If your Palm does not have a recharging facility, be careful about leaving the Palm running for long periods in this mode, since it will drain the batteries faster.

  • "Scroll Up" [& "Scroll Down" for pre OS 3.0 devices] & tapping upper-right screen corner simultaneously, whilst at the Palm HotSync main screen. If this is done correctly, a dialog will pop up saying "DL Server Wait Forever is ON". When this is done, it disables the Palm device timing out from no response from the PC - which, if you're in the middle of tracing line by line or inspecting variables, is more than likely.

As with debugging any other project in Delphi, debugging a conduit is simply a matter of placing breakpoints at the start of the section you wish to debug, and execution will pause at that point - so long as the Delphi IDE was used to launch HotSync, and of course, that the Palm device has an application with a Creator ID matching that of your conduit.

[*] As I mention in the FAQ, it may be possible with the new COM support to embed a conduit in an executable. If this is the case, then you could use the table component inside your executable, so long as HotSync is in progress when you start accessing the tables.