Results 1 to 4 of 4
  1. #1
    arnoutellis Guest

    Default Accessing API from .net

    I'm working on a SQL tool in .net where I want to compare 2 long strings in Beyond Compare. I want a web interface where the user can select 2 SQL scripts to compare, which will then automatically open beyond compare and the two scripts are open and differences are shown.
    In my function I have 2 strings that contain the text I want to compare.

    Is is possible for me to call beyond compare from my function and compare these two strings?
    Alternatively, I could save the strings to 2 separate temporary files. Can I target beyond compare at these two files and open beyond compare showing the file comparison?
    Any help or suggestions on how to set this up and access Beyond Compare API or something along these lines would be great.
    Thanks
    Arnout

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,616

    Default

    Hello,

    We do not offer a graphical web interface, but Beyond Compare 3 can generate HTML reports you could return to your users. Launch BC3 with the graphical interface and load up two of your Temp files. Then generate a Text Compare report from the Session menu of the Text Compare, and pick amongst the various reports and report options available. If any of these meet your needs then we can automate that solution.

    Beyond Compare 3 can run script with variables passed in the command line. So Bcompare.exe @myScript.txt tempfile1.txt tempfile2.txt

    myScript.txt would contain instructions to generate a Text-Compare report. Script can refer to tempfile1.txt as %1 and the 2nd parameter as %2. You can find sample scripts in the Help file under Using Beyond Compare -> Automating with Script: Sample Scripts. Script Reference is available at the Top level of the Help file.

    I would recommend testing script from your own command line to see if it is functioning as you expect before attempting to implement into the server environment.

    Let us know if you have any questions.
    Aaron P Scooter Software

  3. #3
    Join Date
    Jan 2011
    Posts
    1

    Default It will be difficult to execute beyond compare from an IIS server

    I'm trying to execute BCompare.exe in silent mode using an @Script.txt file to run the coparison in script mode.

    IIS is not allowing me to execute beyond compare executable (well no only beyond compare) but it seems IIS worker process does not allow to execute any executable.

    Is there a BCompare DLL that I can use in my C# code behind in order to do a folder comparison using my @script file?

    What I did is to create a C# CGI configured in my IIS then I can execute the CGI and then Beyond compare can be executed, but the thing is this is a big hole in my website security, since I need to pass the folders as a query string to the CGI and a malicious user can do something bad to my website using that hole.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,609

    Default

    Hi Silverio,

    We don't have a DLL version of Beyond Compare 3. It you want to use Beyond Compare 3, your only option is to automate it with command line scripting.

    We do have a DLL version of the File Viewer from Beyond Compare 2 (similar to BC3 Text Compare) called BCDiffer. It does not provide folder comparison, synchronization, or FTP features.

    BCDiffer is licensed separately from Beyond Compare, with price negotiated depending on the distribution of your project. If you're interested in BCDiffer, email us at support@scootersoftware.com to discuss pricing.

    If you don't have very complex diff needs, you might also consider just looking for an open source diff library, a few possibilities are listed here: http://stackoverflow.com/questions/6...are-algorithms
    Chris K Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •