Personally, I think that this feature might be best implemented by calling an external diff program.
There are many available, from commercial utilites like Beyond Compare (
http://www.scootersoftware.com) to freebies like WinDiff (in the Windows Platform SDK).
If you provide some setup option so the user can describe the command line and any switches (specifying the file arguments by replaceable tokens), this would work pretty well. Most source control systems have a similar method to determine what diff utility will be invoked and how to invoke it.