2.2.1.6.1 DOMAIN_NAME_BUFFER

The DOMAIN_NAME_BUFFER structure defines information returned by the NetrEnumerateTrustedDomains method, as specified in section 3.5.4.7.3. The structure is used to describe a set of trusted domain names.

 typedef struct _DOMAIN_NAME_BUFFER {
   ULONG DomainNameByteCount;
   [unique, size_is(DomainNameByteCount)] 
     UCHAR * DomainNames;
 } DOMAIN_NAME_BUFFER,
  *PDOMAIN_NAME_BUFFER;

DomainNameByteCount: The size, in bytes, of the buffer pointed to by the DomainNames field, including all UTF-16 null characters.

DomainNames: The Unicode string buffer that contains the list of trusted domains. The list format is a UTF-16 string composed of one or more substrings. Each substring is separated from adjacent substrings by the UTF-16 null character, 0x0000. After the final substring, the string is terminated by two UTF-16 null characters.

For example, if there are three trusted domains, DOMAIN1, DOMAIN2, and DOMAIN3, the DomainNames string buffer would have the following form:

DOMAIN1<null>DOMAIN2<null>DOMAIN3<null><null>

where <null> is the UTF-16 null character, 0x0000.