Specifies the zero-based index of the source domain.
dwNextDomainIndex
Specifies the index of the domain to link after the source domain.
dwFlags
Specifies any optional flags. Flags may be any combination of FLAG_FAIL_IF_SOURCE_DOMAIN_LINKED or FLAG_FAIL_IF_TARGET_DOMAIN_LINKED. FLAG_OVERWRITE_EXISTING_LINKS may also be specified, but not in conjunction with the others. If FLAG_SET_FIRST_DOMAIN is set, this domain will be set as the first domain in a domain list (the next domain link for dwDomainIndex will be destroyed).
Return Values
Value
Description
S_OK
Success.
E_INVALIDARG
Failure. One or more arguments are invalid
E_FAIL
Failure. The result contradicts with one or more of the flags.