コード例 #1
0
        /// <summary>
        /// Enable a single privilege on the process.
        /// </summary>
        /// <param name="privilege"></param>
        /// <exception cref="">Throws an exception if the privilege is not present
        ///  in the privilege list of the process</exception>
        public void EnablePrivilege(TokenPrivilege privilege)
        {
            TokenPrivileges privs = new TokenPrivileges();

            privs.Add(privilege);
            EnableDisablePrivileges(privs);
        }
コード例 #2
0
ファイル: AccessToken.cs プロジェクト: nuxleus/flexwikicore
 /// <summary>
 /// Enable a single privilege on the process.
 /// </summary>
 /// <param name="privilege"></param>
 /// <exception cref="">Throws an exception if the privilege is not present
 ///  in the privilege list of the process</exception>
 public void EnablePrivilege(TokenPrivilege privilege)
 {
     TokenPrivileges privs = new TokenPrivileges();
     privs.Add(privilege);
     EnableDisablePrivileges(privs);
 }