Question: I am looking for compare utility similar for "win merge" or "beyond compare" .
That in addition for gui comparison will have api that i will be able to run on my files via my code and see if the files are the same or not and also use it in gui mode to show graphically the differences .

Any recommendations ?

thanks

Answer: 
Kdiff might do what you need.
[Kdiff command line](http://kdiff3.sourceforge.net/doc/documentation.html#commandline)
WinMerge IS open source, you could modify it to do what you want (even though I am pretty sure it does have command line access and an API you could use).