Retrieving and Modifying Address Cards
Before you can modify an address card, you must first retrieve its current properties. There are two ways to retrieve the properties.
To retrieve an address card
- Call GetAddressCardProperties to open the address card and retrieve a selected set of properties. This is the preferred method because this function allocates less memory.
– Or –
- Call OpenAddressCard to allocate memory for an address card and retrieve all of the card's properties.
To modify an address card
- Change members of the AddressCard structure retrieved by OpenAddressCard or GetAddressCardProperties.
- Set the property tag for each modified property with a call to the SetMask function to make the modification persistent.
- Call the ModifyAddressCard function on the modified AddressCard structure to complete the process.
To save system resources, you should free the memory allocated by OpenAddressCard or GetAddressCardProperties after the modification is finished by calling the FreeAddressCard function. For every call to OpenAddressCard or GetAddressCardProperties, there should be a corresponding call to FreeAddressCard.