//隐藏调用程序
//hide.exe
#include <windows.h>
int main(){
STARTUPINFO si;
ZeroMemory(&si,sizeof(si));
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
char cmdLine[]= "sheryl.exe";
PROCESS_INFORMATION ProcessInformation;
CreateProcess(NULL,cmdLine,NULL,NULL,1,0,NULL,NULL,&si,&ProcessInformation);
return 0;
}
//隐藏调用后被执行的程序
//sheryl.exe
#include <stdio.h>
void save();
int main(){
save();
return 0;
}
void save(){
FILE *fp;
if((fp=fopen("temp.dat","r"))!=NULL){
fp=fopen("temp.dat","a");
fprintf(fp,"%s","hello",);
}
fclose(fp);
}