|
최준호.스페로 님이 쓰신 글 :
: 이함수를 이용하면 98에서는 컴퓨터를 끌수 있습니다.
: 윈도우2000 계열에서는 로그오프만 되거든요
:
: 윈도우2000에서 전원을 종료하는 방법을 아시는분 갈켜주세요
안녕하세요 만해입니다.
ExitWindowsEx() 함수를 보면요
파라메타가 있는데요
BOOL ExitWindowsEx(
UINT uFlags, // shutdown operation
DWORD dwReserved // reserved
);
이렇게 되어 있고요
uFlag에 따라서 작동이 틀려지짖요
EWX_FORCE
Forces processes to terminate. When this flag is set, Windows does not send the messages WM_QUERYENDSESSION and WM_ENDSESSION to the applications currently running in the system. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency.
EWX_LOGOFF
Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off.
EWX_POWEROFF
Shuts down the system and turns off the power. The system must support the power-off feature.Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.
EWX_REBOOT
Shuts down the system and then restarts the system. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.
EWX_SHUTDOWN
Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.
위에 Win32 SDK의 헬프를 그대로 올렸거든요
참고 하세요
아마 제 생각엔 EWX_SHUTDOWN 이나 EWX_POWEROFF 이면 될것 같네요
그럼 이만~
|