有没有办法比较两个.exes,看看他们之间有什么不同? [英] Is there a way to compare two .exes to see what differs between them?

查看:336
本文介绍了有没有办法比较两个.exes,看看他们之间有什么不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个工具/过程,通过它我可以反编译两个.exes(其中一个在手持设备上运行,另一个不),以便我可以看到什么不同/什么问题可能?



当然,看到一个有00xA,其他人有00xB不会帮助我。我的意思是一种方法来查看不同的代码,或更有可能,编译资源或配置文件的差异,或一些构建选项等。



我几乎是积极的问题与代码本身(如果/ while / switch语句等)无关,但与项目设置无关。



我无法比较工作源,因为它不存在 - 我只有它来自的.exe。我可以得到的源是它的合理的传真,但不完全相同,至少在项目设置和配置等。



UPDATE



Re:。 / p>

UPDATE 3



这里是我试图在我的电脑上尽可能复制我的掌上电脑环境:



我想复制整个爸爸烧的东西(Windows资源管理器中的整个手持设备表示),但它不会让我这样做 - 它不是可复制,所以我只复制了程序文件文件夹(其中包含我的应用程序的子文件夹和一些其他文件夹,我不知道是标准的或自定义/我们特有的)。



这是从 运行的手持设备,所以显然(理论上)应该没有丢失的模块 - Dependency Walker应该运行它,一切都很好。



但是,

注意:即使选择了选项>选项,这也是正确的,配置模块搜索顺序...>应用程序目录>在Dependency Walker中上移



因此,即使一个运行良好的.exe测试为未准备好CE-time,我如何使用它来准确测试哪些,如果有必要的文件丢失?



我需要复制其他文件夹,什么?



UPDATE 4



所以,缺少的模块是:

  API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL 
API-MS-WIN-CORE-WINRT-错误-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1- 0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL

如果为true,

:掌上电脑上的其他文件夹是:

 应用程序数据=>只包含desktop.ini
BTExplorer
我的文档=>包含desktop.ini和几个SQLCE数据库(* .SDF)
profiles =>包含一个空的默认文件夹
Recycled =>包含单个.lnk文件
Temp =>包含一些.tmp文件
Windows =>包含多个文件夹和文件,包括几个.DLL,但不包括上面列出的那些

Program Files文件夹中有一个.NET Compact Framework子文件夹,但它是空的。



在\Windows \AppMgr文件夹中,例如:

  Microsoft .NET Compact Framework.DAT 
Microsoft .NET Compact Framework.DLL
。 ..其他DAT / DLL对,包括:
符号管理类Libraries.DAT(没有相应的DLL)
...甚至一对:
SSCS HHS。[DAT,DLL]

- 这是我们公司的首字母缩略词(SSCS)和项目名称>

什么产生这些?从哪里引用



另一个可能的难题是,.exe不能工作的手持设备不工作有一个\Windows \AppMgr文件夹,因此没有上面列出的.DAT / .DLL文件...



UPDATE 5

$ b另一个奇怪的地方:



阅读完之后:安装在GAC中的文件放在书中的\Windows目录中 Microsoft .NET Compact Framework,我尝试将Windows文件夹从手持设备复制到我的PC上名为3910ProgramFilesFolderCopy的文件夹下,该文件夹在Explorer中如下所示:

  C:
3910ProgramFilesFolderCopy
程序文件
Windows< =试图从handeld复制Windows 3910ProgramFilesFolderCopy的顶部,所以它最终会在这里

...但它只复制几个文件在电子borborygmas发生(电子borborygmas,这是),它告诉我,系统找不到指定的文件




Is there a tool / process by which I can decompile two .exes (one of which runs on a handheld device, the other which doesn't) so that I can get a glimpse into what differs/what the problem may be?

Of course, seeing that one has "00xA" where the other has "00xB" won't help me. I mean a way to see code that differs, or more likely, a compiled resource or config file difference, or some build option or so?

I'm almost positive the problem has nothing to do with code per se (if/while/switch statements, etc.) but with the project setup.

I cannot compare the working source, as it does not exist - I only have the .exe from which it came. The source I have available is a "reasonable facsimile" of it, but not exactly the same, at least not in project settings and configurations, etc.

UPDATE

Re: this page, I'm not familiar with some of the terminology; specifically, where it talks about a "FLATRELEASEDIR" - WTH?

Will this work to test my CE-bound* .exe on my PC:

Run depends.exe*
Open my CE-bound** .exe
Stare in wonder at the amazing plethora of errata and data

?

*Supposedly not to be confused with "adult diapers"

** "bound" as in, "that's where it's headed"

UPDATE 2

Here's what I see when running Dependency Walker on my app:

...but note my dilemma here.

UPDATE 3

Here's what I did to try to replicate my handheld environment on my PC as best as possible:

I wanted to just copy over the whole dad-burned thing (the entire handheld device representation from Windows Explorer), but it won't let me do that - it's not copyable, so I copied over just the "Program Files" folder (which contains the subfolder of my app and a couple of other folders which I don't know are standard or custom/peculiar to us).

This is from the handheld device where the .exe in question does run properly, so obviously (theoretically?) there should be no missing modules - Dependency Walker should run it and say all is well.

However, it doesn't; I get the same results as the one p[a,o]sted above.

Note: This is true even after selecting "Options > Configure Module Search Order... > The Application Directory > Move Up in Dependency Walker.

So since even an .exe that runs fine tests out as being "not ready for CE-time", how can I use this to accurately test which, if any, necessary files are missing?

Do I need to copy over other folders, too, or what?

UPDATE 4

So, the (supposedly?) missing modules are:

API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL

If true, then why does the .exe run on the handheld?

Note: Other folders on the handheld are:

Application Data => only contains "desktop.ini"
BTExplorer
My Documents => contains a "desktop.ini" and several SQLCE databases (*.SDF)
profiles => contains an empty "default" folder
Recycled => contains a single ".lnk" file
Temp => contains a handful of ".tmp" files
Windows => contains a slew of folders and files, including several .DLLs, but none of those listed above

The "Program Files" folder has a ".NET Compact Framework" subfolder, but it is empty.

In the \Windows\AppMgr folder, there are some interesting files, such as:

Microsoft .NET Compact Framework.DAT
Microsoft .NET Compact Framework.DLL
...several other DAT/DLL pairs, including:
Symbol Managed Class Libraries.DAT (no corresponding DLL)
...and even a pair:
SSCS HHS.[DAT,DLL]

-- which is our company acronym (SSCS) and name of the project (HHS)

What generates these? From where are they referenced??

Another possible piece of the puzzle is that the handheld device on which the .exe does not work does not have a \Windows\AppMgr folder, and thus does not have those .DAT/.DLL files listed above...

UPDATE 5

Another oddity:

After reading this: "Files that install in the GAC go in the\Windows directory" in the book "Microsoft .NET Compact Framework" by Andy Wiggly, et al, I tried copying the Windows folder from the handheld device to the spot on my PC below the folder named "3910ProgramFilesFolderCopy" which looks like this in Explorer:

C:
    3910ProgramFilesFolderCopy
        Program Files
        Windows <= tried to copy the "Windows" folder from the handeld on top of "3910ProgramFilesFolderCopy" so it would end up here

...but it only copies a few files before borborygmas occurs (electronic borborygmas, that is) and it tells me, "the system cannot find the file specified"

Heavens to Murgratroid!?! Why does it find some but not all? Looking at the Windows folder on the handheld in Windows Explorer, I see that many of the precious DLLs are greyed out:

Arggh, double-arg, and (&c)

解决方案

For PC you could try .NET Reflector.
http://www.red-gate.com/products/dotnet-development/reflector/

这篇关于有没有办法比较两个.exes,看看他们之间有什么不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆