Export (0) Print
Expand All

4.1.10.4.3 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:

    ulExtendedOp

    roleOwnerObject

    EXOP_FSMO_REQ_ROLE

    The DSName of the FSMO role object.

    EXOP_FSMO_REQ_RID_ALLOC

    The value of the rIDManagerReferenceattribute of DefaultNC().

    EXOP_FSMO_RID_REQ_ROLE

    The value of the rIDManagerReference attribute of DefaultNC().

    EXOP_FSMO_REQ_PDC

    DefaultNC().

    EXOP_FSMO_ABANDON_ROLE

    The DSName of the FSMO role object.

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

msgIn: DRS_MSG_GETCHGREQ_V10
serverObj: DSName
computerObj: DSName
ridSetReferences: DSName

/* An NC replica with root nc must already exist on the client */
if (not MasterReplicaExists(nc)) then
  return ERROR_DS_DRA_BAD_NC
endif

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 :=  
    ConcreteFromAbstractUTD(nc!replUpToDateVector)
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
  else
    msgIn.liFsmoInfo := 0
  endif
else
  msgIn.liFsmoInfo := 0
endif

/* 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
else
  msgIn.usnvecFrom := rf.usnVec
  msgIn.uuidInvocIdSrc := rf.uuidInvocId
endif

if version = 5 then
  msgRequest.V5 := msgIn
  msgRequest.V5.pUpToDateVecDestV1 := msgIn.pUpToDateVecDest
else if version = 8 then
  msgRequest.V8 := msgIn
else
  msgRequest.V10 := msgIn
endif

return 0
 
Show:
© 2014 Microsoft