How can i protect some resource from accessed by two thread in the same time. what is the counterpart function as waitforsingleobject() under windows. a short pieces of codes will be appreciated thanks a lot ___________________________________________________________________ ÍÆ¼ö£¡YEAHÓÊÏä( http://freemail.yeah.net ) 8Õ׿ռ䡣