Ton van Overbeek wrote:
On 2007-10-22, David Laganiere <[EMAIL PROTECTED]> wrote:
Hi!

I'm using this code:
http://rafb.net/p/iepjfg82.html

I'm only using the debugger to go through the code right now and I'm using a Tungsten E2 simulator. The way the code is right now, the call to ContactsGetContact works, that is, it doesn't always return NULL.

If I uncomment lines 780 and 782 and comment line 781, the call to ContactsGetContact always return NULL. Why?

It might be something really easy to figure out but I'm quite new to this and it's hard to work with an undocumented API. When it works it seems to be pretty easy to use though...

Thank you in advance for your help on this one!


Use the PIM SDK instead. See the following information from the latest
Palm SDK (5.5):
------------------------------------------------------------------------
3.1 The PIM SDK

The PIM SDK includes the latest information on PIM databases and structures,
including header files, documentation, and sample code. It must be downloaded
separately from the latest Palm OS SDK at http://pdn.palm.com.

To find the PIM SDK, navigate to develop > platform SDKs > Palm OS. The link to
the PIM SDK is included on the Palm OS platform page. Alternately, you can
search the PDN Knowledge Base for Answer ID 418.

For complete documentation see the document Application Note 4: Accessing PIM
Databases in the PIM SDK.

3.2 Known issue

Palm PIM applications include 4 features:
- Contacts
- Calendar
- Tasks
- Memo

Palm provides two methods for developing applications using Contacts. One is
to call the Contacts library APIs listed in Contacts.h. The second method is to use the APIs provided in the PIM SDK to access the PIM database directly. Please be aware that using the Contacts library APIs listed in Contacts.h may not provide satisfactory performance.

Palm provides only one method for developing applications using the other PIM
features: Calendar, Tasks, and Memo. This method is to use the APIs provided
in the PIM SDK to access the PIM database directly.

When different applications use both methods simultaneously, there may be
conflicts. To prevent conflicts, when you call APIs provided in the PIM SDK
to access the PIM database, pass the dmModeExclusive argument.

If you have used the dmModeExclusive argument and still have database conflicts,
contact Palm DTS.
---------------------------------------------------------------------------

HTH

Ton van Overbeek


I finally gave up trying to use the Contacts API. How can I compile the code Palm gives in it's PIM SDK with Palm OS Developer Suite? I tried creating a new project and then importing the files but I get a bunch of errors while trying to compile. Is there any other sample code around I can use? I also tried to include AddressDB.h, AddressDB.c and AddrDefines.h but I also get a bunch of errors at compilation time.

I'm actually recreating a "Contacts" application with the only ability to send contacts over Bluetooth because my Samsung cell phone vCard standard must be broken because it won't store the data correctly when I send a contact from the existing "Contacts" application. I was made aware it's not possible to take the data the "Contacts" application sends and modify it on-the-fly and that's why I'm working on this little project! I'd appreciate your help or the help of anybody else to compile some sample code that I could then adapt for my needs. I only need to get the categories and the contacts from the existing Contacts database.

Thank you!

--
David

--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to