Just a couple of minor corrections to Werner's post:
The record consists of:
1. a 32-bit Options value
2. a 32-bit Flags bit-field
3. an 8-bit Company Offset value
4. the start of the first field.
The options refer to which phone value to display
and to what labels to use for the 5 phone values.
The flag bits indicate which fields are present
The company offset is used by address book
internally to quickly find the start of the company
field within a packed record. If no company field
is present, it is 0, else it is the number of
bytes which have to be added to the address of
the offset itself to get the company field
(i.e., if the 1st field is "joe" and the next
is the company field, it will be 5).
In the 4.0 source, they have changed the name
of this structure to PrvAddrPackedDBRecord. It
is defined in AddressDB.c, not .h (and has been
for some time), though all the real goodies are
in the .h file as Werner indicates.
-bob mckenzie
-----Original Message-----
From: Werner Poschenrieder [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 7:00 AM
To: Palm Developer Forum
Subject: Re: Address Book Integration
Hi,
The chunk which you receive by DmGetRecord from the AddressDB-Table
includes an
AddrPackedDBRecord.
You will find this probably in file AddressDB.h in the examples folder of
your
PalmOS SDK.
The complete structure of the chunk's data is
1st) the AddrPackedDBRecord, which does not comprise the data fields
themselves
2nd) the data fields themthelves, \0 separated.
You can reference the fields' data by obtaining a pointer to the
AddrPackedDBRecord
and then get the address of the first data field's first character, which
is the Member firstField of
AddrPackedDBRecord.
Concerning the interface question, you can find a discussion point
AdressDB-Interface:
Note my German-English erroneus writing of the word AddressDB, when you
search this
thread ;-).
Dylan Wee Kiat Cheong schrieb:
> Hi,
>
> May I know how do you integrate the built-in Address Book application
> records into another application.
>
> Do you,
>
> 1) Open the address book database and query the records OR
> 2) Is there a better way??
>
> Thanks in advance for any advice rendered
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/