OpenAddressCard

The OpenAddressCard function opens an address card and retrieves its properties.

Syntax

BOOL OpenAddressCard(PEGOID oidCard, AddressCard *pac, ULONG uFlags);

At a Glance

Header file: Addrstor.h
Platforms: H/PC
Versions: 1.0 and later

Parameters

oidCard
Object identifier of an address card.
pac
Pointer to an AddressCard structure that receives the address card's properties.
uFlags
Can be one of the following values:
OAC_ALLOCATE
Allocates memory for each string separately. An application should use this value if it needs to modify the strings. Note that specifying this flag causes the system to allocate twice as much memory as it allocates when this flag is not specified.
Zero (No flag specified)
If no flag is specified (uFlags is set to zero), then no memory is allocated for each of the strings. So, this value can be used if an application does not need to modify the strings. The fields within pac will point to the address card information. Therefore, setting uFlags to zero is useful if an application simply needs to display the information.

Return Values

Returns TRUE if the function succeeds, or FALSE otherwise.

Remarks

The system allocates memory for the address card's properties. After every call to the OpenAddressCard function, an application must free the memory by calling the FreeAddressCard function.

The Contacts database must have been opened by a previous call to the OpenAddressBook function.

See Also

AddressCard, FreeAddressCard, OpenAddressBook