Click here to Skip to main content
15,900,482 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: please help Pin
CPallini11-Oct-07 22:07
mveCPallini11-Oct-07 22:07 
AnswerRe: Searchin hex arry Pin
jhwurmbach11-Oct-07 23:22
jhwurmbach11-Oct-07 23:22 
AnswerRe: Searching hex array Pin
chandu00412-Oct-07 0:57
chandu00412-Oct-07 0:57 
QuestionFlow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 21:08
neha.agarwal2711-Oct-07 21:08 
AnswerRe: Flow is not passing in a worker thread Pin
Karismatic11-Oct-07 21:29
Karismatic11-Oct-07 21:29 
AnswerRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 21:41
chandu00411-Oct-07 21:41 
GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 21:45
neha.agarwal2711-Oct-07 21:45 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 21:59
chandu00411-Oct-07 21:59 
say your thread 1 is like this.
thread1<br />
{<br />
....<br />
....<br />
....<br />
....<br />
api1();<br />
....<br />
....<br />
....<br />
}
if you feel that some times your control is not coming out of api1. right?
so, take a global variable,
say flag=0;
before api1, make flag=1;
and after api1 make it 0;
take another thread, say,
thread2()<br />
{<br />
  int counter=0;<br />
  while(1)<br />
<br />
<br />
  {<br />
   Sleep(1000);//1 second<br />
   if(flag==1)<br />
   {<br />
     counter++;<br />
     if(counter>10)<br />
         terminate thread 1.<br />
   }<br />
   if (flag==0)<br />
   {<br />
     counter=0;<br />
   }<br />
 }<br />
}<br />
<br />
}<br />
}


neha.agarwal27 wrote:
I am not getting where to start a thread and how to apply your procedure

start it just after your main thread creation.

Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.

GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 23:11
neha.agarwal2711-Oct-07 23:11 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 23:24
chandu00411-Oct-07 23:24 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00412-Oct-07 3:15
chandu00412-Oct-07 3:15 
GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2712-Oct-07 18:15
neha.agarwal2712-Oct-07 18:15 
QuestionHow to support 128 dpi and 192 dpi as well? Pin
ttarantula11-Oct-07 20:52
ttarantula11-Oct-07 20:52 
AnswerRe: How to support 128 dpi and 192 dpi as well? Pin
jhwurmbach11-Oct-07 23:27
jhwurmbach11-Oct-07 23:27 
GeneralRe: How to support 128 dpi and 192 dpi as well? [modified] Pin
ttarantula11-Oct-07 23:44
ttarantula11-Oct-07 23:44 
QuestionError: Pin
Jhony george11-Oct-07 19:34
Jhony george11-Oct-07 19:34 
QuestionRe: Error: Pin
Nelek11-Oct-07 20:35
protectorNelek11-Oct-07 20:35 
AnswerRe: Error: Pin
Jhony george11-Oct-07 20:46
Jhony george11-Oct-07 20:46 
AnswerRe: Error: Pin
Michel_Huang11-Oct-07 21:04
Michel_Huang11-Oct-07 21:04 
GeneralRe: Error: Pin
Jhony george11-Oct-07 21:38
Jhony george11-Oct-07 21:38 
QuestionExisting Project including problem Pin
ashishbhatt11-Oct-07 19:00
ashishbhatt11-Oct-07 19:00 
AnswerRe: Existing Project including problem Pin
Michael10111-Oct-07 19:04
Michael10111-Oct-07 19:04 
GeneralRe: Existing Project including problem Pin
ashishbhatt11-Oct-07 19:16
ashishbhatt11-Oct-07 19:16 
GeneralRe: Existing Project including problem Pin
zakkas248311-Oct-07 19:26
zakkas248311-Oct-07 19:26 
GeneralRe: Existing Project including problem Pin
ashishbhatt11-Oct-07 19:39
ashishbhatt11-Oct-07 19:39 

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.