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 didn't really found helpful documentation to use the PIM SDK so I gave
up. I tried including the AddressDB.c and AddressDB.h files in my
project but I was getting a lot of error messages caused by the
inclusion of other files the AddressDB.h include. I also fixed my
problem as I said in my other reply so I think I'll definitely go with
the Contacts API unless I found some really good documentation on the
PIM SDK. I already saw the text part you posted above and it doesn't
mean much to me...
Thank you for your time!
--
David
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/