Click here to Skip to main content
15,888,148 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ code to create thread to handle method Pin
Erudite_Eric3-Sep-13 21:43
Erudite_Eric3-Sep-13 21:43 
GeneralRe: C++ code to create thread to handle method Pin
pasztorpisti3-Sep-13 22:00
pasztorpisti3-Sep-13 22:00 
GeneralRe: C++ code to create thread to handle method Pin
Erudite_Eric4-Sep-13 4:47
Erudite_Eric4-Sep-13 4:47 
GeneralRe: C++ code to create thread to handle method Pin
pasztorpisti4-Sep-13 4:51
pasztorpisti4-Sep-13 4:51 
GeneralRe: C++ code to create thread to handle method Pin
Erudite_Eric5-Sep-13 21:33
Erudite_Eric5-Sep-13 21:33 
GeneralRe: C++ code to create thread to handle method Pin
pasztorpisti5-Sep-13 22:38
pasztorpisti5-Sep-13 22:38 
AnswerRe: C++ code to create thread to handle method Pin
Erudite_Eric3-Sep-13 3:50
Erudite_Eric3-Sep-13 3:50 
AnswerRe: C++ code to create thread to handle method Pin
Eytukan6-Sep-13 2:49
Eytukan6-Sep-13 2:49 
You don't need to change the param & return types of the thread function. leave them as it is.
Just imagine the thread function as a platform to launch your test cases - which would be different functions. Just like the post above, I would choose to go with a data structure that takes in all the parameters required to execute the test case. Including the function pointer. If you are bothered about using function pointers you can even have a switch case block that directs the incoming structure-data to the right function using a normal function call. (it's not the best design I'd say, but it still works).

WORD WINAPI Function( LPVOID lpParam)
{
testcaseData ptcdata* = (testcaseData*) lpParam;
ptcData->Data1, data2.. etc

switch(ptcData->tcID)
{
case 0: 
  TestCase0(...)
case 1:

}

}


And you can use the same Test case index to fill in a Results-vector or list , where it updates the result of the particular test case. The vector can be global or be part of the struct & be protected by a critical section block inside the thread.

Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

QuestionProblem playing (rendering) wave file using WASAPI Pin
AmbiguousName1-Sep-13 19:25
AmbiguousName1-Sep-13 19:25 
QuestionMFCPropertyGridProperty masked edit control Pin
Richard Andrew x641-Sep-13 18:02
professionalRichard Andrew x641-Sep-13 18:02 
AnswerRe: MFCPropertyGridProperty masked edit control Pin
D G McKay1-Sep-13 23:17
D G McKay1-Sep-13 23:17 
GeneralRe: MFCPropertyGridProperty masked edit control Pin
Richard Andrew x641-Sep-13 23:35
professionalRichard Andrew x641-Sep-13 23:35 
Generalabout destructor Pin
Syeda Fatimah30-Aug-13 21:40
Syeda Fatimah30-Aug-13 21:40 
GeneralRe: about destructor Pin
Richard MacCutchan30-Aug-13 21:57
mveRichard MacCutchan30-Aug-13 21:57 
GeneralRe: about destructor Pin
«_Superman_»31-Aug-13 22:58
professional«_Superman_»31-Aug-13 22:58 
GeneralRe: about destructor Pin
Ajay_Tiwari3-Sep-13 0:40
Ajay_Tiwari3-Sep-13 0:40 
GeneralRe: about destructor Pin
Erudite_Eric3-Sep-13 3:47
Erudite_Eric3-Sep-13 3:47 
GeneralRe: about destructor Pin
Ajay_Tiwari15-Sep-13 18:43
Ajay_Tiwari15-Sep-13 18:43 
GeneralRe: about destructor Pin
Erudite_Eric3-Sep-13 3:47
Erudite_Eric3-Sep-13 3:47 
QuestionUsing CDHtmlDialog Pin
Don Guy30-Aug-13 12:58
Don Guy30-Aug-13 12:58 
AnswerRe: Using CDHtmlDialog Pin
Richard MacCutchan30-Aug-13 21:56
mveRichard MacCutchan30-Aug-13 21:56 
GeneralRe: Using CDHtmlDialog Pin
SoMad30-Aug-13 22:20
professionalSoMad30-Aug-13 22:20 
GeneralRe: Using CDHtmlDialog Pin
Richard MacCutchan30-Aug-13 22:40
mveRichard MacCutchan30-Aug-13 22:40 
GeneralRe: Using CDHtmlDialog Pin
Don Guy2-Sep-13 6:25
Don Guy2-Sep-13 6:25 
GeneralRe: Using CDHtmlDialog Pin
Richard MacCutchan2-Sep-13 21:29
mveRichard MacCutchan2-Sep-13 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.