Export (0) Print
Expand All PerformExtendedOpRequestMsg

 procedure PerformExtendedOpRequestMsg (
   hDrs: DRS_HANDLE,
   version: DWORD,
   nc: DSName,
   roleOwnerObject: DSName,
   rf: RepsFrom,
   ulFlags: ULONG,
   ulMoreFlags: ULONG,
   ulExtendedOp: ULONG,
   cMaxObjects: ULONG,
   cMaxBytes: ULONG,
   var msgRequest: DRS_MSG_GETCHGREQ): DWORD

Informative summary of behavior: A client sends an IDL_DRSGetNCChanges request to a server to perform an extended operation. The procedure PerformExtendedOpRequestMsg 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:

  • ulExtendedOp: The requested extended operation. The client MUST supply the same value of this field for each request in a given replication cycle. The possible values are:

    • EXOP_FSMO_REQ_ROLE, for a FSMO role owner transfer.

    • EXOP_FSMO_REQ_RID_ALLOC, for a RID allocation from the RID Master FSMO role owner.

    • EXOP_FSMO_RID_REQ_ROLE, for transfer of the RID Master FSMO role.

    • EXOP_FSMO_REQ_PDC, for transfer of the PDC FSMO role.

    • EXOP_FSMO_ABANDON_ROLE, to request the server to request an extended operation role transfer from the client.

  • roleOwnerObject: The client sets this value based on the value of ulExtendedOp, as per the following table:




    The DSName of the FSMO role object.


    The value of the rIDManagerReference attribute of DefaultNC().


    The value of the rIDManagerReference attribute of DefaultNC().




    The DSName of the FSMO role object.

The procedure returns a Windows error code if it not able to construct msgRequest.

 serverObj: DSName
 computerObj: DSName
 ridSetReferences: DSName
 /* An NC replica with root nc must already exist on the client */
 if (not MasterReplicaExists(nc)) then
 msgIn.ulFlags := ulFlags
 msgIn.ulMoreFlags := ulMoreFlags
 msgIn.cMaxObjects := cMaxObjects
 msgIn.cMaxBytes := cMaxBytes
 msgIn.ulExtendedOp := ulExtendedOp
 msgIn.uuidDsaObjDest := dc.serverGuid
 msgIn.pNC := ADR(roleOwnerObject) 
 msgIn.pUpToDateVecDest :=  
 msgIn.pPartialAttrSetEx := null
 msgIn.pPartialAttrSet := null
 msgIn.PrefixTableDest := 0
 if (ulExtendedOp = EXOP_FSMO_REQ_RID_ALLOC) then
   serverObj := DSAObj()!parent
   computerObj := serverObject!serverReference
   ridSetReferences := computerObj!ridSetReferences
   if ((not ridSetReferences = null)                 and
       (ridSetReferences!isDeleted = false))         and
       (not ridSetReferences!rIDNextRid = null)      and
       (not ridSetReferences!rIDNextRid = 0)         and
       (not ridSetReferences!rIDAllocationPool = null)) then
     msgIn.liFsmoInfo := ridSetReferences!rIDAllocationPool
     msgIn.liFsmoInfo := 0
   msgIn.liFsmoInfo := 0
 /* 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 field was 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
© 2016 Microsoft