Share via


SearchForIndexForAnEqualMask Method

Topic Last Modified: 2006-06-13

Returns the index of an entity in a DACL object whose masks are equal to specified masks.

Applies To

DACL Object

Syntax


ndxEntity  objDACL.SearchForIndexForAnEqualMask(masks);

Parameters

  • masks
    An array of one or more hexadecimal values. Each mask is the 32-bit access mask for the Access Control Entry (ACE).

Return Value

A long value of the entity s index. This method returns a negative number if the entity is not found.

Remarks

This method differs from SearchForObjectByMask in that only a set of masks that are equal in number to the specified masks will result in a match. This method calls the entity object s IsEqualMask method.

If there is more than one entity in the DACL with an equal number of masks, this method only returns one object of the first matched set of masks.

Indexes are zero-based.

Example

ndxEntity index = objDacl.SearchForIndexForAnEqualMask([0x810, 0x3A, 0x0, 0x0, 0x40, 0x0]);
if(index<0){
   //no one had those masks
}