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. Performance on VC++ Application

Performance on VC++ Application

Scheduled Pinned Locked Moved C / C++ / MFC
c++performancehelpquestion
6 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.
  • K Offline
    K Offline
    kikoso
    wrote on last edited by
    #1

    Hello all, I developed a VC++ application. Basically I extract some data from the webcam, process it and give the results to a formular. When I initiate the data processing, the GUI does not respond anymore. The data processing is still going on, because I can check with breakpoints that the analysis has not crash. But as the computer seems to be bussy on the data processing, I can not display it on the Windows. I was considering using Threads, but I´m having some problems with the Threads provided by VC++, so I might move to pthread instead. Does anyone have faced this problem before? Is there any recomendation or suggestion? Thank you, and best regards, Enrique

    M CPalliniC 2 Replies Last reply
    0
    • K kikoso

      Hello all, I developed a VC++ application. Basically I extract some data from the webcam, process it and give the results to a formular. When I initiate the data processing, the GUI does not respond anymore. The data processing is still going on, because I can check with breakpoints that the analysis has not crash. But as the computer seems to be bussy on the data processing, I can not display it on the Windows. I was considering using Threads, but I´m having some problems with the Threads provided by VC++, so I might move to pthread instead. Does anyone have faced this problem before? Is there any recomendation or suggestion? Thank you, and best regards, Enrique

      M Offline
      M Offline
      mav octaval
      wrote on last edited by
      #2

      Which kind of problems are you having with windows threads? You don't need to switch to posix threads, windows threads are a proven technology :rolleyes:

      -- Si dos montan un caballo, uno debe ir detrás.

      K 1 Reply Last reply
      0
      • K kikoso

        Hello all, I developed a VC++ application. Basically I extract some data from the webcam, process it and give the results to a formular. When I initiate the data processing, the GUI does not respond anymore. The data processing is still going on, because I can check with breakpoints that the analysis has not crash. But as the computer seems to be bussy on the data processing, I can not display it on the Windows. I was considering using Threads, but I´m having some problems with the Threads provided by VC++, so I might move to pthread instead. Does anyone have faced this problem before? Is there any recomendation or suggestion? Thank you, and best regards, Enrique

        CPalliniC Offline
        CPalliniC Offline
        CPallini
        wrote on last edited by
        #3

        kikoso wrote:

        I was considering using Threads, but I´m having some problems with the Threads provided by VC++, so I might move to pthread instead.

        Nope, you've to fix your code. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        In testa che avete, signor di Ceprano?

        1 Reply Last reply
        0
        • M mav octaval

          Which kind of problems are you having with windows threads? You don't need to switch to posix threads, windows threads are a proven technology :rolleyes:

          -- Si dos montan un caballo, uno debe ir detrás.

          K Offline
          K Offline
          kikoso
          wrote on last edited by
          #4

          Hola Miguel, and thank you for answering Basically, I´ve the following problems: Following this manual: http://support.microsoft.com/?scid=kb%3Ben-us%3B815805&x=13&y=8[^] Everytime I try to switch to (/clr:oldSyntax), instead of just /clr, I´m getting so many errors with my application (like using public, private, etc :P). Following this manual: http://hemswell.lincoln.ac.uk/~slawson/napier/CO42018/labs/lab06.html[^] The line that says:

          hThreads[0] = CreateThread(NULL,0,MyThread,"T1",NULL,&iID[0]);

          Drop me this error (translated from German to English): error C3867: "OpenCVWin32::Form1::ExampleFunction": The function call is missing argument list. Use "& OpenCVWin32:: Form1:: ExampleFunction" to create a pointer to the member. So I use the mentioned syntax. And then: error C3374: Address of "OpenCVWin32:: Form1:: ExampleFunction" can only be adopted if a delegate instance is created. So at this point I´m really blocked :S

          M 1 Reply Last reply
          0
          • K kikoso

            Hola Miguel, and thank you for answering Basically, I´ve the following problems: Following this manual: http://support.microsoft.com/?scid=kb%3Ben-us%3B815805&x=13&y=8[^] Everytime I try to switch to (/clr:oldSyntax), instead of just /clr, I´m getting so many errors with my application (like using public, private, etc :P). Following this manual: http://hemswell.lincoln.ac.uk/~slawson/napier/CO42018/labs/lab06.html[^] The line that says:

            hThreads[0] = CreateThread(NULL,0,MyThread,"T1",NULL,&iID[0]);

            Drop me this error (translated from German to English): error C3867: "OpenCVWin32::Form1::ExampleFunction": The function call is missing argument list. Use "& OpenCVWin32:: Form1:: ExampleFunction" to create a pointer to the member. So I use the mentioned syntax. And then: error C3374: Address of "OpenCVWin32:: Form1:: ExampleFunction" can only be adopted if a delegate instance is created. So at this point I´m really blocked :S

            M Offline
            M Offline
            mav octaval
            wrote on last edited by
            #5

            I think you are mixing a managed C++ thread tutorial with your unmanaged code. You should look into CreateThread function parameters in MSDN help. Maybe you are passing something that does not conform to the function pointer that it expects in the third parameter.

            -- Si dos montan un caballo, uno debe ir detrás.

            K 1 Reply Last reply
            0
            • M mav octaval

              I think you are mixing a managed C++ thread tutorial with your unmanaged code. You should look into CreateThread function parameters in MSDN help. Maybe you are passing something that does not conform to the function pointer that it expects in the third parameter.

              -- Si dos montan un caballo, uno debe ir detrás.

              K Offline
              K Offline
              kikoso
              wrote on last edited by
              #6

              Thank you Miguel, So far the application seems to compile when I declare the threaded function as static, but I have some memory violations problem (could be solved by using Mutex?). I will read the documentation you suggested me, and try to post if I find a solution. Cheers.

              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