From: R I G Consulting, Inc. on
I am looking for a microsoft or public domain tool that can diff two
binary files (exe, lib or DLL) and able to concur if they are
identical or not *ignoring* the header details such as time stamps.
The idea is to find if two binary files built during two different
time period are identical.

The binary files are built using .NET 2008 version, if that matters.

Please repond to the posting or reply to e-mail. Suggestions and
existing tools, pointers to MSDN are welcome. MVP replies are most
apperciated.

TIA
rigconsulting@[nospam]yahoo.com
From: Mike Lovell on
> I am looking for a microsoft or public domain tool that can diff two
> binary files (exe, lib or DLL) and able to concur if they are
> identical or not *ignoring* the header details such as time stamps.
> The idea is to find if two binary files built during two different
> time period are identical.
>
> The binary files are built using .NET 2008 version, if that matters.
>
> Please repond to the posting or reply to e-mail. Suggestions and
> existing tools, pointers to MSDN are welcome. MVP replies are most
> apperciated.

You say you want to know if it's identical or not? So you're just looking
for a true/false if the files are the same?

If so, just take a hash of each and compare them, the bigger the hash the
less likely collisions (of course they are pretty unlikely anyway for such
an application).

I notice someone has already written one, bound to be many about though:
http://corz.org/windows/software/checksum/

Or if you want to write one, see:

http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1.aspx
http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha512.aspx


IF you want to compare every single byte and list differences, you can just
File.GetAllBytes() the files you want, step through each of them in a for
loop a byte at a time and not the differences.

--
Mike
GoTinker, C# Blog
http://www.gotinker.com

From: Brian Muth on
I really like WinMerge. It can handle entire folders, text files, and will
support binary files as well.

Brian



From: Liviu on
"R I G Consulting, Inc." <rig_poster(a)yahoo.com> wrote...
>I am looking for a microsoft or public domain tool that can diff two
> binary files (exe, lib or DLL) and able to concur if they are
> identical or not *ignoring* the header details such as time stamps.
> The idea is to find if two binary files built during two different
> time period are identical.
>
> The binary files are built using .NET 2008 version, if that matters.

You may have a look at Microsoft's bindiff.exe in the XP Support
Tools package. It works for simple cases, such as an unmanaged C
"hello world" built with the default settings. Does not necessarily work
with all combinations of compiler/debug options and other languages.
If you need finer control, you can always dumpbin.exe the relevant
(to you) PE sections and compare them externally.

Liviu



From: Nobody on
"Brian Muth" <bmuth(a)mvps.org> wrote in message
news:132C3F08-0D29-4E7B-9CB4-446C2934B775(a)microsoft.com...
>I really like WinMerge. It can handle entire folders, text files, and will
>support binary files as well.

Vote #2 for WinMerge. It compares 2 folders, like what changed between 2
projects and it does binary comparison for binary files. It shows "Binary
files are identical" so you know it did binary comparison(based on file
extension).

You could also use "FC" which is part the OS since the DOS days. Example:

fc /b file1 file2

Use "fc /?" to see the command line options.