首页 电脑 电脑学堂 查看内容

贪吃蛇 HTML5 Canvas代码

2015-3-7 15:44 820 0

摘要: 首先建立一个二维类 function Class_Dim(cx, cy){ var x = cx; var y = cy; this.getx = func...
关键词: var canvas function sceneHeight sceneWidth Class Math 格子 canvasHeight snake

检测dll是32/64位 ?[html] view plaincopyvoid CCheck32Or64Dlg::OnButton2()   {      CString fileName = "";      CFileDialog *fileDialog = new CFileDialog(TRUE,NULL,NULL,OFN_HIDEREADONLY,"Dll Files(*.dll)|*.dll|Exe Files(*.exe)|*.exe||",NULL);      if(fileDialog->DoModal()==IDOK)      {          fileName = fileDialog->GetPathName();          byte buf[4];          CFile file(fileName,CFile::modeRead);          file.Seek(0x40-4,0);          file.Read(buf,4);          int a,b,c,d;          a = int(buf[0]);          b = int(buf[1])*256;          c = int(buf[2])*256*256;          d = int(buf[3])*256*256*256;          int sum = a+b+c+d;          file.Seek(sum+4,0);          byte bufMachine[2];          file.Read(bufMachine,2);          int machine = (int)bufMachine[0] + (int)(bufMachine[1])*256;          if(machine == 0x14C)          {              MessageBox(fileDialog->GetFileName()+"是32位PE文件","检测结果");          }          else if(machine == 0x8664)          {              MessageBox(fileDialog->GetFileName()+"是64位PE文件","检测结果");          }          else          {              MessageBox("未能识别:"+fileDialog->GetFileName()+"多少位的PE文件!","检测结果");          }      }  } 
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部