When creating a conduit using this class library, you must follow
the following steps:
- Create a new DLL Project. All Conduits must be DLLs [*].
- 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.
- Drop a copy of the TpfgPalmComponent
onto the data module.
The component takes care of the following details:
For more information on writing the actual guts of the conduit, see
the TConduitExecute section.
- 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
- 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.
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:
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
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:
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
[*] 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.