Export (0) Print
Expand All

DS_REPL_VALUE_META_DATA_BLOB structure

The DS_REPL_VALUE_META_DATA_BLOB structure is used to contain attribute value replication metadata. This structure is similar to the DS_REPL_VALUE_META_DATA_2 structure, but is obtained from the Lightweight Directory Access Protocol API functions when obtaining binary data for the msDS-ReplValueMetaData attribute.

Syntax


typedef struct {
  DWORD    oszAttributeName;
  DWORD    oszObjectDn;
  DWORD    cbData;
  BYTE     *pbData;
  FILETIME ftimeDeleted;
  FILETIME ftimeCreated;
  DWORD    dwVersion;
  FILETIME ftimeLastOriginatingChange;
  UUID     uuidLastOriginatingDsaInvocationID;
  USN      usnOriginatingChange;
  USN      usnLocalChange;
  DWORD    oszLastOriginatingDsaDN;
} DS_REPL_VALUE_META_DATA_BLOB;

Members

oszAttributeName

Contains the offset, in bytes, from the address of this structure to a null-terminated Unicode string that contains the LDAP display name of the attribute corresponding to this metadata. A value of zero indicates an empty or NULL string.

oszObjectDn

Contains the offset, in bytes, from the address of this structure to a null-terminated Unicode string that contains the distinguished name of the object that this attribute belongs to. A value of zero indicates an empty or NULL string.

cbData

Contains the number of bytes in the pbData array.

pbData

Pointer to a buffer that contains the attribute replication metadata. The cbData member contains the length, in bytes, of this buffer.

ftimeDeleted

Contains a FILETIME structure that contains the time that this attribute was deleted.

ftimeCreated

Contains a FILETIME structure that contains the time that this attribute was created.

dwVersion

Contains the version of this attribute. Each originating modification of the attribute increases this value by one. Replication of a modification does not affect the version.

ftimeLastOriginatingChange

Contains a FILETIME structure that contains the time at which the last originating change was made to this attribute. Replication of the change does not affect this value.

uuidLastOriginatingDsaInvocationID

Contains the invocation identifier of the server on which the last change was made to this attribute. Replication of the change does not affect this value.

usnOriginatingChange

Contains the update sequence number (USN) on the originating server at which the last change to this attribute was made. Replication of the change does not affect this value.

usnLocalChange

Contains the USN on the destination server, that is, the server from which the DsReplicaGetInfo2 function retrieved the metadata, at which the last change to this attribute was applied. This value is typically different on all servers.

oszLastOriginatingDsaDN

Contains the offset, in bytes, from the address of this structure to a null-terminated Unicode string that contains the distinguished name of the directory system agent server that originated the last replication. A value of zero indicates an empty or NULL string.

Examples

The following code example shows how to access strings in this structure using the offset members.


void GetNames(DS_REPL_ATTR_META_DATA_BLOB *pdsReplAttrMetaDataBlob
            WCHAR** ppDisplayName,
            WCHAR** ppDistinguishedName)
{
    // Pre-condition: Valid arguments
    ASSERT(0 != pdsReplAttrMetaDataBlob, L"DS_REPL_ATTR_META_DATA_BLOB* parameter invalid");
    ASSERT(0 != ppDisplayName, L"ppDisplayName parameter invalid");
    ASSERT(0 != ppDistinguishedName, L"ppDistinguishedName parameter invalid");

    // Dereference LDAP Display name
    DWORD dwAttributeNameOffset = pdsReplAttrMetaDataBlob->oszAttributeName;
    (*ppDisplayName) = (LPWSTR)((LPBYTE)pdsReplAttrMetaDataBlob + dwAttributeNameOffset);

    // Dereference Distinguished name
    DWORD dwDistinguishedNameOffset = pdsReplAttrMetaDataBlob->oszLastOriginatingDsaDN;
    (*ppDistinguishedName) = (0 != dwDistinguishedNameOffset)
                     ? (LPWSTR)((LPBYTE)pdsReplAttrMetaDataBlob + dwDistinguishedNameOffset)
                     : (LPWSTR)NULL;
    
    return;
}


Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntdsapi.h

See also

DS_REPL_VALUE_META_DATA_2
FILETIME
Lightweight Directory Access Protocol API

 

 

Show:
© 2014 Microsoft