MCPcopy Create free account
hub / github.com/ElyDotDev/windows-kill / customConsoleCtrlHandler

Method customConsoleCtrlHandler

windows-kill-library/ctrl-routine.cpp:111–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 BOOL CtrlRoutine::customConsoleCtrlHandler(DWORD ctrl_type) {
112 if (ctrl_type != CtrlRoutine::current_routine->getEventType()) {
113 return FALSE;
114 }
115 // TODO: remove;
116 //std::cout << "TYPE: " << CtrlRoutine::current_routine->getType() << "\n";
117
118 CtrlRoutine::current_routine->findAddressByStackBackTrace();
119
120 SetEvent(CtrlRoutine::current_routine->found_address_event);
121
122 /* TODO: Remove. No Exception Available here.
123 if (!SetEvent(CtrlRoutine::current_routine->found_address_event)) {
124 throw runtime_error(string("Cannot set event for found address event handle. Code: ") + std::to_string(GetLastError()));
125 }
126 */
127
128 return TRUE;
129 }
130
131 // TODO: a rewrite needed.
132 void CtrlRoutine::findAddressByStackBackTrace() {

Callers

nothing calls this directly

Calls 2

getEventTypeMethod · 0.80

Tested by

no test coverage detected