Delen via


IMetaDataImport::EnumPermissionSets Method

Enumerates permissions for the objects in a specified metadata scope.

HRESULT EnumPermissionSets
   [in, out] HCORENUM      *phEnum, 
   [in]      mdToken       tk, 
   [in]      DWORD         dwActions,
   [out]     mdPermission  rPermission[],
   [in]      ULONG         cMax,
   [out]     ULONG         *pcTokens
);

Parameters

  • phEnum
    [in, out] A pointer to the enumerator. This must be NULL for the first call of this method.

  • tk
    [in] A metadata token that limits the scope of the search, or NULL to search the widest scope possible.

  • dwActions
    [in] Flags representing the SecurityAction values to include in rPermission, or zero to return all actions.

  • rPermission
    [out] The array used to store the Permission tokens.

  • cMax
    [in] The maximum size of the rPermission array.

  • pcTokens
    [out] The number of Permission tokens returned in rPermission.

Return Value

HRESULT

Description

S_OK

EnumPermissionSets returned successfully.

S_FALSE

There are no tokens to enumerate. In that case, pcTokens is zero.

Requirements

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface

IMetaDataImport2 Interface