A afatdog Dec 27, 2003 #1 How to use EnterCriticalSection and LeaveCriticalSection in C#? How to define CRITICAL_SECTION?
B Bob Powell [MVP] Dec 27, 2003 #3 You might want to look at the lock statement too. (from MSDN) lock ensures that one thread does not enter a critical section while another thread is in the critical section of code. If another thread attempts to enter a locked code, it will wait (block) until the object is released. -- Bob Powell [MVP] C#, System.Drawing The November edition of Well Formed is now available. Learn how to create Shell Extensions in managed code. http://www.bobpowell.net/currentissue.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/gdiplus_faq.htm Read my Blog at http://bobpowelldotnet.blogspot.com
You might want to look at the lock statement too. (from MSDN) lock ensures that one thread does not enter a critical section while another thread is in the critical section of code. If another thread attempts to enter a locked code, it will wait (block) until the object is released. -- Bob Powell [MVP] C#, System.Drawing The November edition of Well Formed is now available. Learn how to create Shell Extensions in managed code. http://www.bobpowell.net/currentissue.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/gdiplus_faq.htm Read my Blog at http://bobpowelldotnet.blogspot.com