다음을 통해 공유


SearchForIndexBySIDType Method

Topic Last Modified: 2006-06-13

Returns the index of an entity in a DACL object by a specified SID type.

Applies To

DACL Object

Syntax


ndxEntity  objDACL.SearchForIndexBySIDType(strSIDType);

Parameters

  • strSIDType
    A string value of one of the security identifier types as listed in the following table.

    Security Identifier Type (SID)

    user

    group

    domain

    alias

    well_known_group

    deleted_account

    invalid

    unknown

    computer

Return Value

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

Remarks

If there is more than one entity in the DACL with the same SID Type attribute, this method only returns one object of the first match.

Indexes are zero-based.

Example

var index = objDacl.SearchForIndexBySIDType("group");
if(index<0){
   //no match = no groups
}