MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / OnRunAsSystem

Method OnRunAsSystem

WinArk/MainFrame.cpp:1045–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043}
1044
1045LRESULT CMainFrame::OnRunAsSystem(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
1046 if (SecurityHelper::EnablePrivilege(SE_DEBUG_NAME, true)) {
1047 if (!SecurityHelper::IsSysRun()) {
1048 if (SecurityHelper::SysRun(L"runas"))
1049 SendMessage(WM_CLOSE);
1050 }
1051 }
1052 return 0;
1053}
1054
1055LRESULT CMainFrame::OnFileExit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
1056 PostMessage(WM_CLOSE);

Callers

nothing calls this directly

Calls 1

EnablePrivilegeFunction · 0.85

Tested by

no test coverage detected