Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Calling Windiff within my program

Calling Windiff within my program

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gilfrog
    wrote on last edited by
    #1

    How do you call Windiff from with in a program and specify the two files that you want compared. In the help of WinDiff it tells about Invoking Windiff from the command line To compare two files Windiff path_to_first_file path_to_second_file How do i implement this? Thanks Scott

    M 1 Reply Last reply
    0
    • G Gilfrog

      How do you call Windiff from with in a program and specify the two files that you want compared. In the help of WinDiff it tells about Invoking Windiff from the command line To compare two files Windiff path_to_first_file path_to_second_file How do i implement this? Thanks Scott

      M Offline
      M Offline
      Martin Ziacek
      wrote on last edited by
      #2

      Use CreateProcess() and absolute paths to Windiff executable and files to compare.

      G 1 Reply Last reply
      0
      • M Martin Ziacek

        Use CreateProcess() and absolute paths to Windiff executable and files to compare.

        G Offline
        G Offline
        Gilfrog
        wrote on last edited by
        #3

        Works great, thanks The only problem is, that it doesn't like the paths passes in the command line if they have spaces. Is there a way to convert them to a DOS style with a tilda or something else? Scott

        M 1 Reply Last reply
        0
        • G Gilfrog

          Works great, thanks The only problem is, that it doesn't like the paths passes in the command line if they have spaces. Is there a way to convert them to a DOS style with a tilda or something else? Scott

          M Offline
          M Offline
          Martin Ziacek
          wrote on last edited by
          #4

          It used to work for me as well, with no problem. Check documentaion again (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred\_9dpv.asp) and possibly try to use lpApplicationName only to specify path and parameters.

          G 1 Reply Last reply
          0
          • M Martin Ziacek

            It used to work for me as well, with no problem. Check documentaion again (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred\_9dpv.asp) and possibly try to use lpApplicationName only to specify path and parameters.

            G Offline
            G Offline
            Gilfrog
            wrote on last edited by
            #5

            It does open up Windiff correctly but the problem is that why i send in the files to compare "C:\My Documents\test.h C:\My Documents\test2.h" it tells me that it can not open the file "C:\My" It works if the directories don't have spaces in them. Scott

            M 1 Reply Last reply
            0
            • G Gilfrog

              It does open up Windiff correctly but the problem is that why i send in the files to compare "C:\My Documents\test.h C:\My Documents\test2.h" it tells me that it can not open the file "C:\My" It works if the directories don't have spaces in them. Scott

              M Offline
              M Offline
              Martin Ziacek
              wrote on last edited by
              #6

              I am sorry, I understood you wrong. You can convert path with spaces into its short version with this function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio\_0cyt.asp

              G M 2 Replies Last reply
              0
              • M Martin Ziacek

                I am sorry, I understood you wrong. You can convert path with spaces into its short version with this function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio\_0cyt.asp

                G Offline
                G Offline
                Gilfrog
                wrote on last edited by
                #7

                thanks, that's what i needed Scott

                1 Reply Last reply
                0
                • M Martin Ziacek

                  I am sorry, I understood you wrong. You can convert path with spaces into its short version with this function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio\_0cyt.asp

                  M Offline
                  M Offline
                  Mike Nordell
                  wrote on last edited by
                  #8

                  I think it's better to just quote ("") the two paths than to re-introduce the horrible 8.3 limits again.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups