The AuthzrInitializeCompoundContext method (opnum 2) creates a compound context from two specified context handles.

 DWORD AuthzrInitializeCompoundContext(
         [in] AUTHZR_HANDLE UserContextHandle,
         [in] AUTHZR_HANDLE DeviceContextHandle,
         [out] AUTHZR_HANDLE* CompoundContextHandle);
  

UserContextHandle: An AUTHZR_HANDLE structure, as defined in section 2.2.1.1, that represents the user context for the compound context.

DeviceContextHandle: An AUTHZR_HANDLE structure, as defined in section 2.2.1.1, that represents the device context for the compound context.

CompoundContextHandle: A pointer to an AUTHZR_HANDLE structure, as defined in section 2.2.1.1.

Return Values:

If the function succeeds, the function MUST return 0x00000000. If the function fails, it MUST return a nonzero value.

When a RAZA server receives this message, the server MUST perform the following:

  1. Allocate a new ImpersonationAccessToken.

  2. Copy the ImpersonationAccessToken.Sids array in the ImpersonationAccessToken of the UserContextHandle into the ImpersonationAccessToken.Sids array in the ImpersonationAccessToken created in step 1.

  3. Copy the ImpersonationAccessToken.UserIndex field in the ImpersonationAccessToken of the UserContextHandle to the ImpersonationAccessToken.UserIndex field in the ImpersonationAccessToken created in step 1.

  4. Copy the ImpersonationAccessToken.UserClaims array in the ImpersonationAccessToken of the UserContextHandle to the ImpersonationAccessToken.UserClaims array in the ImpersonationAccessToken created in step 1.

  5. Copy the ImpersonationAccessToken.Sids array in the ImpersonationAccessToken of the DeviceContextHandle into the ImpersonationAccessToken.DeviceSids array in the ImpersonationAccessToken created in step 1.

  6. Copy the ImpersonationAccessToken.UserIndex field in the ImpersonationAccessToken of the DeviceContextHandle to the ImpersonationAccessToken.DeviceIndex field in the ImpersonationAccessToken created in step 1.

  7. Copy the ImpersonationAccessToken.UserClaims array in the ImpersonationAccessToken of the DeviceContextHandle to the ImpersonationAccessToken.DeviceClaims array in the ImpersonationAccessToken created in step 1.

  8. Allocate and initialize a new AUTHZR_HANDLE structure.

  9. Allocate a new ClientContext object, set the RPCClient member to the AUTHZR_HANDLE allocated in step 8, and set the AuthzContext member to the ImpersonationAccessToken created in step 1.

  10. Add the new ClientContext object to the ClientContextList.