Share via


AddSimpleSecurityEntity Method

Topic Last Modified: 2006-06-13

This method adds a new entity object with no SID, SID type, or display name to a DACL object s entity collection.

Applies To

DACL Object

Syntax


objResult  objDACL.AddSimpleSecurityEntity(strNT4Name, masks);

Parameters

  • strNT4Name
    A string value of the domain and username of a security principal.
  • masks
    An array of hexadecimal numbers; for example, [0x1fc9ff, 0x2, 0x12089, 0x0, 0x4, 0x0]. This number is the 32-bit access mask for the Access Control Entry (ACE).

Return Value

An object that returns error codes and descriptions.

Example

var objResult = objDacl.AddSimpleSecurityEntity("MYDOMAIN\\User1", [0x1fc9ff, 0x2, 0x12089, 0x0, 0x4, 0x0]);
if( 1 == objResult.number) {
    //0 means user was added, no errors
    //1 means no error, but the user was not added  maybe a duplicate
}