반응형 ExitWindowsEx1 [MFC] 재부팅 기능 개발환경은 Windows 7 64bit, Visual Studio 2013 버전이다 HANDLE hCurHandle = GetCurrentProcess(); HANDLE hNewHandle = NULL; OpenProcessToken(hCurHandle, TOKEN_ADJUST_PRIVILEGES, &hNewHandle); TOKEN_PRIVILEGES tp; LUID luid; LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &luid); tp.PrivilegeCount = 1; tp.Privileges[0].Luid = luid; tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges(hNew.. 2016. 10. 13. 이전 1 다음 반응형