Is the dll detected 32/64-bit ?, Dll32
Is the dll detected 32/64-bit?
Void 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-bit PE file", "detection result");} else if (machine = 0x8664) {MessageBox (fileDialog-> GetFileName () + "is a 64-bit PE file", "detection result");} else {MessageBox ("unidentifiable: "+ fileDialog-> GetFileName () +" Number of PES File! "," Detection result ");}}}