net_lim.rar_The Privileges_delphi Privilege_delphi PrivilegeS_to
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
procedure tform1.ShutDown procedure AdjustToken() //获取关机控制权 var hdlProcessHandle, hdlTokenHandle, lBufferNeeded: Cardinal tmpLuid: Int64 //tkpPrivilegeCount: Int64 tkp, tkpNewButIgnored: TOKEN_PRIVILEGES Privilege: array[0..0] of _LUID_AND_ATTRIBUTES begin hdlProcessHandle := GetCurrentProcess OpenProcessToken(hdlProcessHandle, (TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY), hdlTokenHandle) // Get the LUID for shutdown privilege. LookupPrivilegeValue( , SeShutdownPrivilege , tmpLuid) Privilege[0].Luid := tmpLuid Privilege[0].Attributes := SE_PRIVILEGE_ENABLED tkp.PrivilegeCount := 1 // One privilege to set tkp.Privileges[0] := Privilege[0] // Enable the shutdown privilege in the access token of this process. AdjustTokenPrivileges(hdlTokenHandle,
- 1
- 粉丝: 63
- 资源: 1万+
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助