How to use threads?
-
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it. how am i going to use the AfxBeginThread??
-
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it. how am i going to use the AfxBeginThread??
This is a broad and complex issue. Steve
-
This is a broad and complex issue. Steve
-
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it. how am i going to use the AfxBeginThread??
Use the following definition format for the THread procedure UINT Threadproc(LPVOID pparam){return 0;} and call the thread as AfxBeginThread(Threadproc,this); Remember this is worker thread Knock out 't' from can't, You can if you think you can :cool:
-
Use the following definition format for the THread procedure UINT Threadproc(LPVOID pparam){return 0;} and call the thread as AfxBeginThread(Threadproc,this); Remember this is worker thread Knock out 't' from can't, You can if you think you can :cool:
Telling someone how to start a thread without mentioning threading issues such as synchronisation is like giving a child a gun to play with. I don’t mean any disrespect to the person who asked the question by saying this; but writing multithreaded programs is hard and full of potential pitfalls that simply don’t exist in a single threaded application. For example, even something as simple as incrementing a counter is potentially dangerous in a multithreaded program. Steve
-
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it. how am i going to use the AfxBeginThread??
-
I mean shld i use user-interface or worker thread? or do u have any reference to recommend me?
Wo
KongHL wrote:
or do u have any reference to recommend me?
How to Use Worker Thread:- http://www.flounder.com/workerthreads.htm[^] How to use UserInterface Thread:- http://www.flounder.com/uithreads.htm[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
WhiteSky wrote:
See Here[^]maybe it is some helpful to you
I agree with Mr Stephen [HERE][^] for same!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it. how am i going to use the AfxBeginThread??
KongHL wrote:
how am i going to use the AfxBeginThread??
Like this:
AfxBeginThread(CRuntimeClass* pThreadClass, int nPriority, UINT nStackSize, DWORD dwCreateFlags, LPSECURITY_ATTRIBUTES lpSecurityAttrs)
:rolleyes:
--[V]--