This topic defines how the contact schema is used to read and write contact properties using IContactProperties.
New applications should not use these interfaces. These interfaces exist for backward compatibility with legacy applications. These interfaces will be unavailable in the future.
Applications that use contacts may want contact data that the application-supplied schema does not provide. IContactProperties supports two approaches to extend the base contact schema:
These properties contain many values differentiated by labels. To access the heirarchical properties through IContactProperties::GetString, IContactProperties::GetDate, and IContactProperties::GetBinary you need to provide an index (1 based). For example, a parameter in the form of L"NameCollection/Name[1]/Title" returns the Title string of the first Name property in the contact.
| Property | Value | Description |
|---|
| CONTACTPROP_PUB_L1_CONTACTIDS | L"ContactIDCollection" | A collection of ContactIDs associated with this contact |
| CONTACTPROP_PUB_L2_CONTACTID | L"/ContactID" | An entry in the collection of IDs |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | One of the unique identifiers for this contact (as a string) |
| CONTACTPROP_PUB_L1_NAMECOLLECTION | L"NameCollection" | A collection of names associated with this contact |
| CONTACTPROP_PUB_L2_NAME | L"/Name" | An entry in the collection of names |
| | CONTACTPROP_PUB_L3_FORMATTEDNAME | L"/FormattedName" | The name as displayed, such as "John H. Smith III" |
| | CONTACTPROP_PUB_L3_PHONETIC | L"/Phonetic"" | Name as pronounced |
| | CONTACTPROP_PUB_L3_PREFIX | L"/Prefix"" | A prefix to the contact name, such as "Ms." |
| | CONTACTPROP_PUB_L3_TITLE | L"/Title" | A person's title, such as "Dr." |
| | CONTACTPROP_PUB_L3_GIVENNAME | L"/GivenName" | A person's first name |
| | CONTACTPROP_PUB_L3_FAMILYNAME | L"/FamilyName" | A person's last name |
| | CONTACTPROP_PUB_L3_MIDDLENAME | L"/MiddleName" | A person's middle name |
| | CONTACTPROP_PUB_L3_GENERATION | L"/Generation" | A person's family name generation, such as "III" or "Jr." |
| | CONTACTPROP_PUB_L3_SUFFIX | L"/Suffix" | A person's credentials, such as "PhD" |
| | CONTACTPROP_PUB_L3_NICKNAME | L"/NickName" | A person's nickname, such as "Ace" |
| CONTACTPROP_PUB_L1_POSITIONCOLLECTION | L"PositionCollection" | Collection of positions that a contact holds |
| CONTACTPROP_PUB_L2_POSITION | L"/Position" | An entry in the collection of names |
| | CONTACTPROP_PUB_L3_ORGANIZATION | L"/Organization" | The contact's organization, such as "IEEE" |
| | CONTACTPROP_PUB_L3_COMPANY | L"/Company" | The contact's company, such as "Microsoft" |
| | CONTACTPROP_PUB_L3_DEPARTMENT | L"/Department" | The department, such as "Accounting" |
| | CONTACTPROP_PUB_L3_OFFICE | L"/Office" | The office number, such as "10/1234" |
| | CONTACTPROP_PUB_L3_JOB_TITLE | L"/JobTitle" | Any job title, such as "Software Engineer" |
| | CONTACTPROP_PUB_L3_PROFESSION | L"/Profession" | The line of work, such as "Plumber" |
| | CONTACTPROP_PUB_L3_ROLE | L"/Role" | The role in the organization, such as "Quality Assurance" |
| CONTACTPROP_PUB_L1_PERSONCOLLECTION | L"PersonCollection" | Collection of people associated with the contact |
| CONTACTPROP_PUB_L2_PERSON | L"/Person" | Entry in the collection |
| | CONTACTPROP_PUB_L3_FORMATTEDNAME | L"/FormattedName" | The person's formatted (display) name |
| | CONTACTPROP_PUB_L3_PERSONID | L"/PersonID" | Unique ID for this person, which may be a ContactID from another IContact entry |
| CONTACTPROP_PUB_L1_DATECOLLECTION | L"DateCollection" | Collection of dates associated with the contact |
| CONTACTPROP_PUB_L2_DATE | L"/Date" | Entry in the collection |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | Value for this date, as a DateTime |
| CONTACTPROP_PUB_L1_EMAILADDRESSCOLLECTION | L"EmailAddressCollection" | Collection of email addresses |
| CONTACTPROP_PUB_L2_EMAILADDRESS | L"/EmailAddress" | Entry in the collection |
| | CONTACTPROP_PUB_L3_ADDRESS | L"/Address" | The address, such as example@microsoft.com |
| | CONTACTPROP_PUB_L3_TYPE | L"/Type" | Type of address (for example, SMTP or x509) |
| CONTACTPROP_PUB_L1_CERTIFICATECOLLECTION | L"CertificateCollection" | Collection of certificate data and thumbprints |
| CONTACTPROP_PUB_L2_CERTIFICATE | L"/Certificate" | Entry in the collection |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | Certificate value |
| | CONTACTPROP_PUB_L3_THUMBPRINT | L"/ThumbPrint" | Thumbprint value |
| CONTACTPROP_PUB_L1_PHONENUMBERCOLLECTION | L"PhoneNumberCollection" | Collection of phone numbers |
| CONTACTPROP_PUB_L2_PHONENUMBER | L"/PhoneNumber" | Entry in the collection |
| | CONTACTPROP_PUB_L3_NUMBER | L"/Number" | Normal number to display (as string) |
| | CONTACTPROP_PUB_L3_ALTERNATE | L"/Alternate" | Alternate number (as string) |
| CONTACTPROP_PUB_L1_PHYSICALADDRESSCOLLECTION | L"PhysicalAddressCollection" | Collection of physical addresses |
| CONTACTPROP_PUB_L2_PHYSICALADDRESS | L"/PhysicalAddress" | Entry in the collection |
| | CONTACTPROP_PUB_L3_ADDRESSLABEL | L"/AddressLabel" | The exact data that a mailing label contains |
| | CONTACTPROP_PUB_L3_STREET | L"/Street" | Number and street |
| | CONTACTPROP_PUB_L3_LOCALITY | L"/Locality" | City or urban district |
| | CONTACTPROP_PUB_L3_REGION | L"/Region" | State or Province |
| | CONTACTPROP_PUB_L3_POSTALCODE | L"/PostalCode" | Zip or PostalCode |
| | CONTACTPROP_PUB_L3_COUNTRY | L"/Country" | The country, territory, or nation |
| | CONTACTPROP_PUB_L3_POBOX | L"/POBox" | Any POBox number |
| | CONTACTPROP_PUB_L3_EXTENDEDADDRESS | L"/ExtendedAddress" | Any extra information |
| CONTACTPROP_PUB_L1_IMADDRESSCOLLECTION | L"IMAddressCollection" | Instant Messaging Service (IM) addresses and protocols |
| CONTACTPROP_PUB_L2_IMADDRESSENTRY | L"/IMAddress" | Entry in the collection |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | The identifing data (for example, username@microsoft.com) |
| | CONTACTPROP_PUB_L3_PROTOCOL | L"/Protocol" | The protocol as a string (for example, Messenger Protocol) |
| CONTACTPROP_PUB_L1_URLCOLLECTION | L"UrlCollection" | Collection of URLs associated with this contact |
| CONTACTPROP_PUB_L2_URL | L"/Url" | An entry in the collection of url |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | The actual URL data (as a string) |
| CONTACTPROP_PUB_L1_PHOTOCOLLECTION | L"PhotoCollection" | Collection of images associated with this contact |
| CONTACTPROP_PUB_L2_PHOTO | L"/Photo" | An entry in the collection of photos |
| | CONTACTPROP_PUB_L3_VALUE | L"/Value" | Image that represents the contact (binary with MIME type) |
| | CONTACTPROP_PUB_L3_URL | L"/Url" | A URL for retrieving the image (as a string) |
These labels differentiate second level (L2) entries. For example, a company address is created by labelling a CONTACTPROP_PUB_L2_PHYSICALADDRESS property as Business.
The following labels can be associated with PhoneNumber elements.
The following labels can be associated with Person elements. Some of these labels are specific to the Microsoft Windows Address Book (WAB).
The following labels can be associated with PhysicalAddress elements.
The following labels can be associated with Photo elements.
The following labels can be associated with Date elements. These labels are specific to WAB.
The following labels can be associated with Url elements. These labels are specific to WAB.