Addressing Messages with CMC

You address messages with CMC by calling the cmc_look_up function to find addresses that you can then use with the cmc_send function. By calling cmc_look_up, you can search for names in the address book and resolve names into the addresses used by the underlying messaging system.

Both cmc_look_up and cmc_send make heavy use of the CMC_recipient structure. The cmc_look_up function uses it on input to receive the name of the recipient you are trying to look up. On output, cmc_look_up passes back an array of CMC_recipient structures that contain the results of the search. The cmc_send function uses a CMC_recipient structure to receive the address or addresses of the recipients of the message being sent.

    To look up names and address information in the address book
  1. Establish a session either through the cmc_logon function or interactively by sending the CMC_LOGON_UI_ALLOWED flag value with the cmc_look_up function.
  2. Translate a user's display name (what the user sees) into a messaging address (what the underlying messaging system uses) by calling cmc_look_up. With this function, you can also request that the standard CMC address dialog box be displayed for the user to view recipient-specific details or create addressing lists.
  3. Release memory allocated by CMC by calling the cmc_free function.
  4. End the session by calling the cmc_logoff function.