Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can find how thread running in my application Pin
Le@rner4-Jan-11 23:56
Le@rner4-Jan-11 23:56 
AnswerRe: how can find how thread running in my application [modified] Pin
Nuri Ismail5-Jan-11 0:04
Nuri Ismail5-Jan-11 0:04 
GeneralRe: how can find how thread running in my application Pin
Le@rner5-Jan-11 1:12
Le@rner5-Jan-11 1:12 
QuestionReplace dialog in FormView Pin
jaknupp4-Jan-11 23:39
jaknupp4-Jan-11 23:39 
AnswerRe: Replace dialog in FormView Pin
bleedingfingers4-Jan-11 23:46
bleedingfingers4-Jan-11 23:46 
GeneralRe: Replace dialog in FormView Pin
jaknupp5-Jan-11 9:47
jaknupp5-Jan-11 9:47 
GeneralRe: Replace dialog in FormView Pin
bleedingfingers5-Jan-11 21:31
bleedingfingers5-Jan-11 21:31 
GeneralRe: Replace dialog in FormView Pin
jaknupp6-Jan-11 17:29
jaknupp6-Jan-11 17:29 
QuestionVisual Studio: Resources ID based on other resources ID Pin
Pascal_334-Jan-11 22:50
Pascal_334-Jan-11 22:50 
AnswerRe: Visual Studio: Resources ID based on other resources ID Pin
Richard MacCutchan5-Jan-11 0:38
mveRichard MacCutchan5-Jan-11 0:38 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_335-Jan-11 2:28
Pascal_335-Jan-11 2:28 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Richard MacCutchan5-Jan-11 7:11
mveRichard MacCutchan5-Jan-11 7:11 
QuestionRe: Visual Studio: Resources ID based on other resources ID Pin
CPallini5-Jan-11 1:10
mveCPallini5-Jan-11 1:10 
AnswerRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_335-Jan-11 2:20
Pascal_335-Jan-11 2:20 
GeneralRe: Visual Studio: Resources ID based on other resources ID [modified] Pin
CPallini5-Jan-11 2:22
mveCPallini5-Jan-11 2:22 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_335-Jan-11 2:44
Pascal_335-Jan-11 2:44 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
CPallini5-Jan-11 3:10
mveCPallini5-Jan-11 3:10 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_335-Jan-11 5:29
Pascal_335-Jan-11 5:29 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Roger Broomfield5-Jan-11 12:46
Roger Broomfield5-Jan-11 12:46 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_335-Jan-11 22:02
Pascal_335-Jan-11 22:02 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
CPallini6-Jan-11 4:09
mveCPallini6-Jan-11 4:09 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
Pascal_336-Jan-11 5:49
Pascal_336-Jan-11 5:49 
GeneralRe: Visual Studio: Resources ID based on other resources ID Pin
CPallini6-Jan-11 6:00
mveCPallini6-Jan-11 6:00 
QuestionProblem: ISAPI Extension Add custom header Pin
theoneneo244-Jan-11 22:47
theoneneo244-Jan-11 22:47 
QuestionProblem with WaitForSingleObject Pin
Amol Jaikar4-Jan-11 21:09
Amol Jaikar4-Jan-11 21:09 
CWinThread* m_pcThread1;
CWinThread* m_pcThread2;
int a1[100], a2[100],a3[200];
para* a;
int* a9;
para* b;
int* b9;
int* ptr = a3;
a = new para;
b = new para;
a->main_ptr = a1;
a->val = 1;
b->main_ptr = a2;
b->val = 0;
m_pcThread1 = AfxBeginThread(WorkerThreadProc,a,THREAD_PRIORITY_NORMAL,0,0,NULL);
m_pcThread2 = AfxBeginThread(WorkerThreadProc,b,THREAD_PRIORITY_NORMAL,0,0,NULL);
// MessageBox("Thread Started");
// if(WaitForSingleObject(m_pcThread1, INFINITE) == WAIT_OBJECT_0)
WaitForSingleObject(m_pcThread1,INFINITE);
WaitForSingleObject(m_pcThread2,INFINITE);
a9 = a->main_ptr; b9 = b->main_ptr;
for(int i = 0; i<100;i++)
{
*ptr = *a9;
*(ptr+100) = *b9;
ptr++;
a9++;
b9++;
}
MessageBox("Calculated");
------------------------------------------------------------

Above code is not waiting for thread to complete. I can not understand
what is the problem? please help me

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.