CMC_counted_string

A CMC_counted_string structure is an optional structure supporting character sets that allow embedded null characters. The structure contains a counted string and explicitly defines the length of the string.

Quick Info

Header file: XCMC.H

typedef struct { 
     CMC_uint32     length; 
     char      string[1]; 
} CMC_counted_string; 
 

Members

length
The length, in bytes, of the string specified by the string member.
string
An array of characters that make up the string. CMC does not require the string to be null-terminated.

Remarks

If a client application uses counted strings instead of null-terminated strings, it must set the CMC_COUNTED_STRING_TYPE flag in the cmc_logon function's logon_flags parameter when logging on to a MAPI session through cmc_logon. The data pointed to by a string of type CMC_string is then assumed to be defined as a CMC_counted_string structure.

To determine the character set of a string, the CMC implementation looks at the information for a session identified by a CMC_session_id data type. CMC implementations always attempt to map all strings passed to the client application to the character set for the session. If no session has been created by a call to cmc_logon, CMC interprets the string by using the implementation's default character set.

See Also

CMC_string