ICELIB0.NLM → ICE_ParseInternetMailAddress()
ICE_ParseInternetMailAddress
- Description:
- Converts an eMail address string into a static four-element array.
- Syntax for C:
- void *ICE_ParseInternetMailAddress (
char *eMailAddress,
unsigned int flags,
int *returnCode
);
- Syntax for Assembly:
- Call ICE_ParseInternetMailAddress C, offset eMailAddress, [flags], offset returnCode
- Parameters:
-
- eMailAddress
- (IN) Points to the null-terminated eMail address (string) to be parsed.
- flags
- (IN) All undocumented bit flags are considered reserved for future use, and should remain cleared (0) to ensure upward compatibility with newer versions of ICELIB0.NLM. Currently supported flags are none.
- returnCode
- (OUT) Pointer to 32-bit value which will contain one of the following return codes if the parsing fails:
0 = Successful operation
1 = Source string is too short (must be at least 1 byte long)
2 = Memory alloction failure
3 = Invalid characters encountered
4 = Opening bracket missing (closing bracket found first)
5 = Closing bracket missing (only if opening bracket exists)
6 = Too many opening brackets (more than one)
7 = Too many closing brackets (unbalanced angle brackets)
8 = Ambiguous opening angle bracket (after closing bracket)
9 = Premature closing angle bracket (before "@" symbol)
10 = Too many "@" symbols in eMail address
11 = Address incomplete (string terminates before "@" symbol)
- Returns:
- Pointer to buffer (created by malloc()) that holds the static array as follows, if not 0
0 = No buffer created, see value of "returnCode" for reason
Array:
- 32-bit pointer to local user name (string)
- 32-bit pointer to internet domain name (string)
- 32-bit pointer to preceeding comments (string)
- 32-bit pointer to succeeding comments (string)
- Remarks:
- The resulting array will always have four elements, each a NULL terminated string. In the case of no data, the string is simply a NULL string.
Remember to use NetWare's free() function when you no longer need the array.
- Resource files:
- icelib0.imp