Introduction
General Info
|
Basics Registration Debugging |
BasicsWhen creating a conduit using this class library, you must follow the following steps:
The component takes care of the following details:
RegistrationAs 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.dllIf 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. DebuggingThe 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 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. |