private static NtEvent OpenEvent(string name, bool read_only)
        {
            EventAccessRights access = EventAccessRights.QueryState;

            if (!read_only)
            {
                access |= EventAccessRights.ModifyState;
            }
            return(NtEvent.Open(name, null, access));
        }
Exemple #2
0
 /// <summary>
 /// Method to create an object from a set of object attributes.
 /// </summary>
 /// <param name="obj_attributes">The object attributes to create/open from.</param>
 /// <returns>The newly created object.</returns>
 protected override object CreateObject(ObjectAttributes obj_attributes)
 {
     return(NtEvent.Open(obj_attributes, Access));
 }