msdn link

The NetrDatabaseDeltas method SHOULD<217> return a set of changes (or deltas) performed to the SAM database, SAM built-in database, or LSA databases after a particular value of the database serial number. It is used by BDCs to request database changes from the PDC that are missing on the BDC.

 NTSTATUS NetrDatabaseDeltas(
   [in, string] LOGONSRV_HANDLE PrimaryName,
   [in, string] wchar_t* ComputerName,
   [in] PNETLOGON_AUTHENTICATOR Authenticator,
   [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
   [in] DWORD DatabaseID,
   [in, out] PNLPR_MODIFIED_COUNT DomainModifiedCount,
   [out] PNETLOGON_DELTA_ENUM_ARRAY* DeltaArray,
   [in] DWORD PreferredMaximumLength
 );

PrimaryName: The custom binding handle (as defined in section 3.5.4.1) that represents the connection to the PDC.

ComputerName: The null-terminated Unicode string that contains the NetBIOS name of the BDC calling this method.

Authenticator: A pointer to a NETLOGON_AUTHENTICATOR structure that contains the client authenticator.

ReturnAuthenticator: A pointer to a NETLOGON_AUTHENTICATOR structure that contains the server return authenticator.

DatabaseID: The identifier for a specific account database set as follows:

Value

Meaning

0x00000000

Indicates the SAM database.

0x00000001

Indicates the SAM built-in database.

0x00000002

Indicates the LSA database.

DomainModifiedCount: A pointer to an NLPR_MODIFIED_COUNT structure, as specified in section 2.2.1.5.26, that contains the database serial number. On input, this is the value of the database serial number on the client. On output, this is the value of the database serial number corresponding to the last element (delta) returned in the DeltaArray parameter.

DeltaArray: A pointer to a NETLOGON_DELTA_ENUM_ARRAY structure that contains an array of enumerated changes (deltas) to the specified database with database serial numbers larger than the database serial number value specified in the input value of the DomainModifiedCount parameter.

PreferredMaximumLength: The value that specifies the preferred maximum size, in bytes, of data to return in the DeltaArray parameter. This is not a hard upper limit but serves as a guide to the server. The server SHOULD<218> stop including elements in the returned DeltaArray after the size of the returned data equals or exceeds the value of the PreferredMaximumLength parameter. It is up to the client implementation to choose the value for this parameter.

Return Values: The method returns 0x00000000 on success; otherwise, it returns a nonzero error code.

The synchronization that this method performs is not a full synchronization; rather, a subset of database changes is returned. To perform a full synchronization, call NetrDatabaseSync.

The server that receives this call MUST do the following: