Extract a property of an address from a list of parsed addresses.
argument informationstatus = PMDF_address_get_property
(addr_context, index, property, result, result_len)
| Argument | Data type | Access | Mechanism |
|---|---|---|---|
| addr_context | context pointer | read | value |
| index | integer | read | value |
| property | integer | read | value |
| result | descriptor | read/write | reference |
| result_len | unsigned word | write | reference |
argument informationstatus = PMDFaddressGetProperty
(addr_context, index, property, result, result_len)
int PMDFaddressGetProperty (addr_context, index, property,
result, result_len)
PMDF_addr *addr_context;
int index;
int property
char *result;
int *result_len;
addr_context
Address context generated by a previous call to PMDF_address_parse_list.index
Index of the address to obtain the property for.property
The address property to return.result
String to receive the address property. Must be at least ALFA_SIZE bytes in length. (ALFA_SIZE+1 bytes for PMDFaddressGetProperty.)result_len
Length in bytes of the returned property. Callers using PMDFaddressGetProperty must, on input, supply the maximum length in bytes of result.
After parsing a line of addresses with PMDF_address_parse_list, properties of individual addresses may be retrieved with PMDF_address_get_property. The index argument may range from 1 to count where count is the count of parsed addresses returned by PMDF_address_parse_list. The first address corresponds to an index value of 1. The accepted values for property are listed and described in the table below. Note that unlike PMDF_get_address_property, PMDF_address_get_property does not accept the PMDF_PROP_FRIENDLY property.Return Values
Table 1-3 Properties of the address phrase <@otherhost:user@host>Symbolic name Value Description PMDF_PROP_ADDRESS 1 Address part, @ otherhost: user@ host, of the addressPMDF_PROP_DOMAIN 2 Domain part, host, of the addressPMDF_PROP_LOCAL 4 Local part, user, of the addressPMDF_PROP_PHRASE 5 Phrase part, phrase, of the address, if anyPMDF_PROP_PROPER 6 Full address including any phrases and comments PMDF_PROP_ROUTE 7 Source route part, @ otherhost:, of the address, if any
| PMDF__OK | Normal, successful completion. |
| PMDF__BAD | Bad parameter supplied: invalid value for property. No result returned. |
| PMDF__FATERRLIB | Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No result returned. |
| PMDF__INSVIRMEM | Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No result returned. |
| PMDF__INVSTRDES | Invalid string descriptor for result: descriptor has an invalid value in its DSC$B_CLASS field. No result returned. |
| PMDF__NO | Value for index is out of range. No result returned. |
| PMDF__STRTRU | Supplied string was too long; result truncated to fit. |