Do the work in a thread, use WaitForSingleObject for waiting.

Signature
Un saludo
Rodrigo Corral González [MVP]
FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org
Hi Rodrigo
yes i know that but i meant somthing else.
mu problem is :
im doing two threads.
but if im doing it with sleep() function it take allot of resources,
and the entire application slow down.
maybe you have an idea how it possible to solve without the sleep().
Thanks
> Do the work in a thread, use WaitForSingleObject for waiting.
Rodrigo Corral [MVP] - 21 Jun 2005 09:00 GMT
Using WaitForSingleObject function you can specify how much time you want to
wait.

Signature
Un saludo
Rodrigo Corral González [MVP]
FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org
Gabi - 21 Jun 2005 09:48 GMT
Hi Rodrigo,
yes that was my problem because i put on
waitforsingleobject(xx,0) time=0
in do while loop
so all the time the program was busy.
after put a normal time like 10msec it released and evrything works nice.
Thanks
> Using WaitForSingleObject function you can specify how much time you want to
> wait.
Rodrigo Corral [MVP] - 21 Jun 2005 13:12 GMT
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224318

Signature
Un saludo
Rodrigo Corral González [MVP]
FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org