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