Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Application Source Code > ApplicationA

ApplicationA

// 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;
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial