5.115.5 GetChgReplyToSearchResult

 procedure GetChgReplyToSearchResult (
     [in] chgReply: DRS_MSG_GETCHGREPLY_NATIVE,
     [out] searchResultEntryList: SearchResultEntryList,
     [out] dirSyncResponseControl: Control)

Informative summary of behavior: The GetChgReplyToSearchResult procedure generates a list of search result entries (searchResultEntryList) and an LDAP_SERVER_DIRSYNC_OID response control (dirSyncResponseControl) from a DRS_MSG_GETCHGREPLY_NATIVE structure.

The arguments to this procedure are as follows:

  • chgReply: A DRS_MSG_GETCHGREPLY_NATIVE message generated by the GetReplChanges function.

  • searchResultEntryList: A list of search result entries.

  • dirSyncResponseControl: The control that is sent back to the client.

      
     objCount: ULONG
     valCount: ULONG
     replEntinfList: REPLENTINFLIST
     responseControlValue: DirSyncControlValue
     objectGuid: GUID
     attrType: ATTRTYP
     minCookieLength: ULONG
     utdVectorSize: ULONG
      
      
     objCount := chgReply.cNumObjects
     valCount := chgReply.cNumValues
      
      
     /* Process object updates. */
      
      
     replEntinfList := chgReply.pObjects
     while (not replEntinfList = null)
           TransformEntinfToSearchEntry(replEntinfList.Entinf,
                                        searchResultEntryList.entry)
      
      
           Add objectGUID attribute with value = 
               replEntinfList.Entinf.pName.Guid to
               searchResultEntryList.entry
      
      
           Add parentGUID attribute with value = 
               replEntinfList.pParentGuid to
               searchResultEntryList.entry
      
      
           replEntinfList := replEntinfList.pNextEntInf
           searchResultEntryList := searchResultEntryList.next
     endwhile
      
      
     /* Process value updates. */
      
      
     foreach distinct object GUID objectGuid, referred by replValInf,
     in chgReply.rgValues
      
      
         TransformReplValInfNativeListToSearchEntry(
             replValInf.pObject, chgReply, searchResultEntryList.entry)
      
      
         Add objectGUID attribute with value = 
               replValInf.pObject.Guid to
               searchResultEntryList.entry
      
      
         searchResultEntryList := searchResultEntryList.next
     endfor
      
      
     /* Construct LDAP_SERVER_DIRSYNC_OID response control */
      
      
     dirSyncResponseControl.value.controlType := LDAP_SERVER_DIRSYNC_OID
     dirSyncResponseControl.value.criticality := false
      
      
     responseControlValue := GetResponseDirSyncControlValue (chgReply)
     dirSyncResponseControl.value.controlValue := 
                                  BER encoding of the responseControlValue
      
      
     return
    
Show: