MCPcopy Create free account
hub / github.com/SaadAhla/HeapCrypt / ResumeThreads

Function ResumeThreads

HeapCrypt/HeapEncryptDecrypt.cpp:30–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30void ResumeThreads(DWORD mainThread) {
31
32 HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, GetCurrentProcessId());
33
34 THREADENTRY32 te32;
35 te32.dwSize = sizeof(THREADENTRY32);
36
37 if (!Thread32First(hSnapshot, &te32))
38 return;
39
40 do {
41 if (te32.th32OwnerProcessID == GetCurrentProcessId() && te32.th32ThreadID != mainThread) {
42
43 ResumeThread(OpenThread(THREAD_ALL_ACCESS, FALSE, te32.th32ThreadID));
44 }
45 } while (Thread32Next(hSnapshot, &te32));
46
47}
48
49
50

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected