4.1.9.2 Server Behavior of the IDL_DRSGetMemberships2 Method

Informative summary of behavior: The IDL_DRSGetMemberships2 method is merely a way to execute a series of IDL_DRSGetMemberships RPC calls via a single RPC request.

 ULONG
 IDL_DRSGetMemberships2(
     [in, ref] DRS_HANDLE hDrs,
     [in] DWORD dwInVersion,
     [in, ref, switch_is(dwInVersion)]
         DRS_MSG_GETMEMBERSHIPS2_REQ *pmsgIn,
     [out, ref] DWORD *pdwOutVersion,
     [out, ref, switch_is(*pdwOutVersion)]
         DRS_MSG_GETMEMBERSHIPS2_REPLY *pmsgOut)
  
 error, i: ULONG
 dummyVersion: DWORD
  
 ValidateDRSInput(hDrs, 21)
  
 pdwOutVersion^ := 1
 pMsgOut^.V1.Count := 0
 pMsgOut^.V1.Replies := null
  
 if dwInVersion ≠ 1 then
   return ERROR_DS_DRA_INVALID_PARAMETER
 endif
  
 pmsgOut^.V1.Count := pmsgIn^.V1.Count
  
 for i := 0 to pmsgIn^.V1.Count - 1
   /* Call IDL_DRSGetMemberships as a local procedure. */
   error := IDL_DRSGetMemberships(null, 1, ADR(pmsgIn^.V1.Request[i]),
       ADR(dummyVersion), ADR(pmsgOut^.V1.Replies[i]))
  
   if error ≠ 0 then
     return error
   endif
 endfor
  
 return 0
Show: