procedure ReplSingleObjRequestMsg(
   hDrs: DRS_HANDLE,
   version: DWORD,
   nc: DSName,
   object: DSName,
   rf: RepsFrom,
   ulFlags: ULONG,
   ulMoreFlags: ULONG,
   cMaxObjects: ULONG,
   cMaxBytes: ULONG,
   fWithSecrets: boolean,
   var msgRequest: DRS_MSG_GETCHGREQ): DWORD

Informative summary of behavior: The client can send an IDL_DRSGetNCChanges request to the server to replicate changes from a single object. The ReplSingleObjRequestMsg procedure specifies how the request message is constructed for this operation. The arguments for this method are the same as those for the procedure ReplicateNCRequestMsg, with the following exceptions:

  • object: The DSName of the object that should be replicated.

  • fWithSecrets: The object's secret attributes should be replicated. Only RODCs need to make, and can make, this request.

The procedure returns a Windows error code if it cannot construct msgRequest.

 ncType: ULONG
 /* An NC replica with root of DSName nc must already exist on the 
    client */
 if (not PartialGCReplicaExists(nc) and
     not FullReplicaExists(nc)) then
 /* Only RODCs are allowed to request secrets explicitly */
 if fWithSecrets and not AmIRODC() then
 if fWithSecrets then
   msgIn.ulExtendedOp := EXOP_REPL_SECRETS
   msgIn.ulExtendedOp := EXOP_REPL_OBJ
 if AmIRODC()then
   if DRS_WRIT_REP in ulFlags then
   ext := ServerExtensions(hDrs)
   if not DRS_EXT_LH_BETA2 in ext.dwFlags and
      msgIn.pNC^ = SchemaNC() then
     ulFlags := ulFlags + {DRS_WRIT_REP}
 ncType = GetNCType(nc)
 if not NCT_GC_PARTIAL in ncType then
   ulFlags := ulFlags + {DRS_GET_ALL_GROUP_MEMBERSHIP}
 msgIn.ulFlags := ulFlags
 msgIn.ulMoreFlags := ulMoreFlags
 msgIn.cMaxObjects := cMaxObjects
 msgIn.cMaxBytes := cMaxBytes
 msgIn.uuidDsaObjDest := dc.serverGuid
 msgIn.pNC := ADR(object) 
 msgIn.liFsmoInfo := 0
 msgIn.pUpToDateVecDest :=   
 msgIn.pPartialAttrSetEx := null
 /* set msgIn.pPartialAttrSet field */
 if ObjExists(nc) and nc!partialAttributeSet ≠ null then
   msgIn.pPartialAttrSet := ConcretePASFromAbstractPAS(
   if (NCT_GC_PARTIAL in ncType  and 
       NCT_FILTERED_ATTRIBUTE_SET in ncType)} then
     msgIn.pPartialAttrSet := FilteredGCPAS()
   else if NCT_FILTERED_ATTRIBUTE_SET in ncType then
     msgIn.pPartialAttrSet := FilteredPAS()
   else if NCT_GC_PARTIAL in ncType then
     msgIn.pPartialAttrSet := GCPAS()
     msgIn.pPartialAttrSet := null
 msgIn.PrefixTableDest = ConcretePTFromAbstractPT(dc.prefixTable)
 /* Fill usnvecFrom and uuidInvocIdSrc fields. 
  * usnvecFrom: This field contains the value of the usnVec field in 
  * RepsFrom tuple corresponding to the IDL_DRSGetNCChanges server
  * DC, or zeros if no such repsFrom is present. 
  * uuidInvocIdSrc: If the usnvecFrom field is not zeros, this field
  * MUST contain the uuidInvocId from the same tuple from which the 
  * usnVec fieldwas retrieved. Otherwise, this field contains
  * zeros.*/
 if (rf = null) then 
   msgIn.usnvecFrom := 0
   msgIn.uuidInvocIdSrc := 0
   msgIn.usnvecFrom := rf.usnVec
   msgIn.uuidInvocIdSrc := rf.uuidInvocId
 if version = 5 then
   msgRequest.V5 := msgIn
   msgRequest.V5.pUpToDateVecDestV1 := msgIn.pUpToDateVecDest
 else if version = 8 then
   msgRequest.V8 := msgIn
   msgRequest.V10 := msgIn
 return 0