双击会运行system("pause")打开计算器
现在禁止打开
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
#include<string.h>
#include"detours.h"
#pragma comment (lib ,"detours.lib" )
static int (*oldsystem)(const char * _Command) = system;
int newsystem(const char * _Command ){
return 0;
}
void Hook()
{
DetourRestoreAfterWith();
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(( void **)&oldsystem, newsystem);
DetourTransactionCommit();
}
_declspec(dllexport ) void go(){
Hook();
}