C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[16236] Re:Re:Re:[질문]만해님 감사합니다. 그런데 실제로 윈도우2000에서 태스트 해보세요
지나가는 사람 [] 1054 읽음    2002-03-12 13:19
이글을 보고 소스를 찾아봤는데.. 찾을수가 없네요..

NT계열은 그냥 ExitWindows로는 전원을 OFF 할수 없습니다.

누군가 이걸 물어보기에.. NT에서 전원OFF되는 소스를 만들어서..
보내준게 있었는데.. 아무리 찾아봐도 없습니다.

privileges 를 써야하는건 기억이나는데..
좀더 찾아보도록 하지요..


최준호.스페로 님이 쓰신 글 :
: 답변 정말로 감사합니다.
: 관심 가져 주셔서 감사합니다.
:
: ExitWindowsEx(EWX_FORCE  ,  0) ; //일단 실행중인 모든 프로그램을 종료
: //그래야 저장 메세지 등등을 무시하고 모두 닫아 버리고
:
: ExitWindowsEx(EWX_SHUTDOWN   ,  0) ; //컴퓨터 종료
:
: 이렇게 코딩을 했는데요
: 98에서는 문제 없이 전원이 OFF됩니다.
: 그런데 2000에서는 컴퓨터는 종료 되지 않고 다시 로그온 으로 갑니다... ㅠ.ㅠ
: 이걸 어찌 해결하지요
:
:
:
:
: 만해 님이 쓰신 글 :
: : 최준호.스페로 님이 쓰신 글 :
: : : 이함수를 이용하면 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 이면 될것 같네요
: :
: : 그럼 이만~

+ -

관련 글 리스트
16233 [질문]ExitWindowsEx()를 이용하여 컴퓨터를 끌때.. 최준호.스페로 1008 2002/03/12
16990     Re:[질문]ExitWindowsEx()를 이용하여 컴퓨터를 끌때.. 도움이 되었으면 1215 2002/03/28
16234     Re:[질문]ExitWindowsEx()를 이용하여 컴퓨터를 끌때.. 만해 1556 2002/03/12
16235         Re:Re:[질문]만해님 감사합니다. 그런데 실제로 윈도우2000에서 태스트 해보세요 최준호.스페로 1138 2002/03/12
16239             Re:Re:Re:[질문]만해님 감사합니다. 그런데 실제로 윈도우2000에서 태스트 해보세요 박진훈 1032 2002/03/12
16236             Re:Re:Re:[질문]만해님 감사합니다. 그런데 실제로 윈도우2000에서 태스트 해보세요 지나가는 사람 1054 2002/03/12
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.