4.1.12.4 Server Behavior of the IDL_DRSGetObjectExistence Method

Informative summary of behavior: The server computes a cluster, an objectGUID sequence, and a digest in the same manner as the client, but uses the server's NC replica. If the digest computed by the server equals the digest in the client's request, the server returns dwStatusFlags = 1, otherwise the server returns dwStatusFlags = 0 and the objectGUID sequence.

 ULONG IDL_DRSGetObjectExistence (
     [in, ref] DRS_HANDLE hDrs,
     [in] DWORD dwInVersion,
     [in, ref, switch_is(dwInVersion)] DRS_MSG_EXISTREQ *pmsgIn,
     [out, ref] DWORD *pdwOutVersion,
     [out, ref, switch_is(*pdwOutVersion)]
         DRS_MSG_EXISTREPLY *pmsgOut)
  
 msgIn: DRS_MSG_EXISTREQ_V1
 nc: DSName
 s: sequence of GUID
 digest: sequence [0..15] of byte
 msgOut: DRS_MSG_EXISTREPLY_V1
 *pdwOutVersion = 1;
  
 ValidateDRSInput(hDrs, 23)
  
 pdwOutVersion^ := 1
 pmsgOut^.V1.dwStatusFlags := 0
 pmsgOut^.V1.cNumGuids := 0
 pmsgOut^.V1.rgGuids := null
  
 if dwInVersion ≠ 0x1 then
   return ERROR_DS_DRA_INVALID_PARAMETER
 endif
 msgIn := pmsgIn^.V1
 nc := msgIn.pNC^
 if not MasterReplicaExists(nc) then
   return ERROR_DS_DRA_INVALID_PARAMETER
 endif
 if msgIn.guidStart = NULLGUID then
   return ERROR_DS_DRA_INVALID_PARAMETER
 endif
 if not AccessCheckCAR(nc, DS-Replication-Get-Changes) then
   return ERROR_DS_DRA_ACCESS_DENIED
 endif
 GuidSequence(msgIn.guidStart, msgIn.cGuids, nc,
     msgIn.pUpToDateVecCommonV1^, s, digest)
 if msgIn.Md5Digest = digest then
   msgOut.dwStatusFlags := 1
   msgOut.cNumGuids := 0
   msgOut.rgGuids := null
 else if
   msgOut.dwStatusFlags := 0
   msgOut.cNumGuids := s.length
   for i := 0 to s.length - 1
     msgOut.rgGuids[i] := s[i]
   endfor
 endif
 pmsgOut^.V1 := msgOut
 return 0
Show: