Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
// ApplicationA
// Illustrates MessageBox memory dump analysis pattern
// Copyright (c) 2011 Memory Dump Analysis Services
// GNU GENERAL PUBLIC LICENSE
// http://www.gnu.org/licenses/gpl-3.0.txt
#include "stdafx.h"
void thread_A(void *)
{
while (true)
{
Sleep(1000*(int)'A');
}
}
void thread_B(void *)
{
while (true)
{
Sleep(1000*(int)'B');
}
}
void thread_C(void *)
{
while (true)
{
Sleep(1000*(int)'C');
}
}
void thread_D(void *)
{
while (true)
{
MessageBox(NULL, L"Message", L"Error", MB_OK);
Sleep(1000*(int)'D');
}
}
void thread_E(void *)
{
while (true)
{
Sleep(1000*(int)'E');
}
}
void thread_F(void *)
{
while (true)
{
Sleep(1000*(int)'F');
}
}
int _tmain(int argc, _TCHAR* argv[])
{
_beginthread(thread_A, 0, NULL);
_beginthread(thread_B, 0, NULL);
_beginthread(thread_C, 0, NULL);
_beginthread(thread_D, 0, NULL);
_beginthread(thread_E, 0, NULL);
_beginthread(thread_F, 0, NULL);
while (true)
{
Sleep(INFINITE);
}
return 0;
}