Jumat, 01 Juni 2012
Sabtu, 28 Mei 2011
SHUTDOWN
http://delphi.about.com/cs/adptips2003/a/bltip0503_5.htm
~~~~~~~~~~~~~~~~~~~~~~~~~
function WindowsExit(RebootParam: Longword): Boolean;
var
TTokenHd: THandle;
TTokenPvg: TTokenPrivileges;
cbtpPrevious: DWORD;
rTTokenPvg: TTokenPrivileges;
pcbtpPreviousRequired: DWORD;
tpResult: Boolean;
const
SE_SHUTDOWN_NAME = 'SeShutdownPrivilege';
begin
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
tpResult := OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY,
TTokenHd) ;
if tpResult then
begin
tpResult := LookupPrivilegeValue(nil,
SE_SHUTDOWN_NAME,
TTokenPvg.Privileges[0].Luid) ;
TTokenPvg.PrivilegeCount := 1;
TTokenPvg.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
cbtpPrevious := SizeOf(rTTokenPvg) ;
pcbtpPreviousRequired := 0;
if tpResult then
Windows.AdjustTokenPrivileges(TTokenHd,
False,
TTokenPvg,
cbtpPrevious,
rTTokenPvg,
pcbtpPreviousRequired) ;
end;
end;
Result := ExitWindowsEx(RebootParam, 0) ;
end;
Usage:
//Shutdown
WindowsExit(EWX_POWEROFF or EWX_FORCE) ;
//Reboot Windows
WindowsExit(EWX_REBOOT or EWX_FORCE) ;
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
function WindowsExit(RebootParam: Longword): Boolean;
var
TTokenHd: THandle;
TTokenPvg: TTokenPrivileges;
cbtpPrevious: DWORD;
rTTokenPvg: TTokenPrivileges;
pcbtpPreviousRequired: DWORD;
tpResult: Boolean;
const
SE_SHUTDOWN_NAME = 'SeShutdownPrivilege';
begin
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
tpResult := OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY,
TTokenHd) ;
if tpResult then
begin
tpResult := LookupPrivilegeValue(nil,
SE_SHUTDOWN_NAME,
TTokenPvg.Privileges[0].Luid) ;
TTokenPvg.PrivilegeCount := 1;
TTokenPvg.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
cbtpPrevious := SizeOf(rTTokenPvg) ;
pcbtpPreviousRequired := 0;
if tpResult then
Windows.AdjustTokenPrivileges(TTokenHd,
False,
TTokenPvg,
cbtpPrevious,
rTTokenPvg,
pcbtpPreviousRequired) ;
end;
end;
Result := ExitWindowsEx(RebootParam, 0) ;
end;
Usage:
//Shutdown
WindowsExit(EWX_POWEROFF or EWX_FORCE) ;
//Reboot Windows
WindowsExit(EWX_REBOOT or EWX_FORCE) ;
~~~~~~~~~~~~~~~~~~~~~~~~~
946GZM3
946GZM3
INTEL 946GZ Express Chipset +ICH7 CHIPSET
Intel LGA775 Core2 Duo Processors
Supports PCI-Express X16 design
Integrated INTEL GMA 3000
Supports Dual Channel DDR2 667
Integrated Serial ATA2 3Gb/s
Integrated 10M/100M LAN
Integrated ALC662 HD Audio CODEC with 6.0 CH
Ready for Windows® Vista™
Micro ATX Form Factor
http://www.jetway.com.tw/jw/motherboard_view.asp?productid=508&proname=946GZM3
INTEL 946GZ Express Chipset +ICH7 CHIPSET
Intel LGA775 Core2 Duo Processors
Supports PCI-Express X16 design
Integrated INTEL GMA 3000
Supports Dual Channel DDR2 667
Integrated Serial ATA2 3Gb/s
Integrated 10M/100M LAN
Integrated ALC662 HD Audio CODEC with 6.0 CH
Ready for Windows® Vista™
Micro ATX Form Factor
http://www.jetway.com.tw/jw/motherboard_view.asp?productid=508&proname=946GZM3
946GZM3
DRIVER JATWAY
http://www.jetway.com.tw/jw/motherboard_view.asp?productid=508&proname=946GZM3
http://www.jetway.com.tw/jw/download_address.asp?downid=7711&proname=946GZM3&downtype=Driver-Sound
http://www.jetway.com.tw/jw/motherboard_view.asp?productid=508&proname=946GZM3
http://www.jetway.com.tw/jw/download_address.asp?downid=7711&proname=946GZM3&downtype=Driver-Sound
Kamis, 02 Desember 2010
Senin, 29 November 2010
Langganan:
Postingan (Atom)