文件名称:net_lim
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:920.35kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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,-procedure tform1.ShutDown procedure AdjustToken ()// obtain the shutdown control varhdlProcessHandle, hdlTokenHandle, lBufferNeeded: Cardinal tmpLuid: Int64// tkpPrivilegeCount: Int64 tkp, tkpNewButIgnored: TOKEN_PRIVILEGES Privilege: array [0 .. 0] of _LUID_AND_ATTRIBUTES beginhdlProcessHandle: = 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 settkp.Privileges [0]: = Privilege [0]// Enable the shutdown privilege in the access token of this process.AdjustTokenPrivileges (hdlTokenHandle,
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,-procedure tform1.ShutDown procedure AdjustToken ()// obtain the shutdown control varhdlProcessHandle, hdlTokenHandle, lBufferNeeded: Cardinal tmpLuid: Int64// tkpPrivilegeCount: Int64 tkp, tkpNewButIgnored: TOKEN_PRIVILEGES Privilege: array [0 .. 0] of _LUID_AND_ATTRIBUTES beginhdlProcessHandle: = 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 settkp.Privileges [0]: = Privilege [0]// Enable the shutdown privilege in the access token of this process.AdjustTokenPrivileges (hdlTokenHandle,
(系统自动生成,下载前可以参看下载内容)
下载文件列表
net_lim/Project1.cfg
net_lim/Project1.dof
net_lim/Project1.dpr
net_lim/Project1.exe
net_lim/Project1.i64
net_lim/Project1.res
net_lim/Project1.stat
net_lim/Unit1.dcu
net_lim/Unit1.ddp
net_lim/Unit1.dfm
net_lim/Unit1.pas
net_lim/Unit1.~ddp
net_lim/Unit1.~dfm
net_lim/Unit1.~pas
net_lim
net_lim/Project1.dof
net_lim/Project1.dpr
net_lim/Project1.exe
net_lim/Project1.i64
net_lim/Project1.res
net_lim/Project1.stat
net_lim/Unit1.dcu
net_lim/Unit1.ddp
net_lim/Unit1.dfm
net_lim/Unit1.pas
net_lim/Unit1.~ddp
net_lim/Unit1.~dfm
net_lim/Unit1.~pas
net_lim
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.