AuthzAddSidsToContext function (authz.h)

The AuthzAddSidsToContext function creates a copy of an existing context and appends a given set of security identifiers (SIDs) and restricted SIDs.

Syntax

AUTHZAPI BOOL AuthzAddSidsToContext(
  [in]  AUTHZ_CLIENT_CONTEXT_HANDLE  hAuthzClientContext,
  [in]  PSID_AND_ATTRIBUTES          Sids,
  [in]  DWORD                        SidCount,
  [in]  PSID_AND_ATTRIBUTES          RestrictedSids,
  [in]  DWORD                        RestrictedSidCount,
  [out] PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
);

Parameters

[in] hAuthzClientContext

An AUTHZ_CLIENT_CONTEXT_HANDLE structure to be copied as the basis for NewClientContext.

[in] Sids

A pointer to a SID_AND_ATTRIBUTES structure containing the SIDs and attributes to be added to the unrestricted part of the client context.

[in] SidCount

The number of SIDs to be added.

[in] RestrictedSids

A pointer to a SID_AND_ATTRIBUTES structure containing the SIDs and attributes to be added to the restricted part of the client context.

[in] RestrictedSidCount

Number of restricted SIDs to be added.

[out] phNewAuthzClientContext

A pointer to the created AUTHZ_CLIENT_CONTEXT_HANDLE structure containing input values for expiration time, identifier, flags, additional SIDs and restricted SIDs.

Return value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header authz.h
Library Authz.lib
DLL Authz.dll
Redistributable Windows Server 2003 Administration Tools Pack on Windows XP

See also

Basic Access Control Functions

SID_AND_ATTRIBUTES