⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stress_test.cpp

📁 ExcpHook is an open source (see license.txt) Exception Monitor for Windows made by Gynvael Coldwind
💻 CPP
字号:
#define _WIN32_WINNT 0x505
#include <cstdio>
#include <windows.h>

using namespace std;

LONG CALLBACK MyHandler(
 PEXCEPTION_POINTERS ExceptionInfo
)
{
  putchar('.');
  return EXCEPTION_CONTINUE_EXECUTION;
}

DWORD WINAPI MyThread(PVOID a)
{
  while(1)
  {
    *(int*)0 = 0; 
  }

  return 0;
}

int
main(void)
{
  int i;
  puts("Press ctrl-c to stop");
  AddVectoredExceptionHandler(1, MyHandler);
 

  for(i = 0; i < 10; i++)
  {
    CreateThread(NULL, 0, MyThread, 0, 0, NULL);
  }

  while(1)
  {
  }
 
  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -