Click to See Complete Forum and Search --> : Concurrent functions?? Plzz Help


JConfuzed
June 12th, 2003, 06:29 AM
I am using FindFirstChangeNotification function with WaitForSingleObject

They are implemented in my own function called MonitorFolder()
However when this function is called then i can not concurrently perform other functions such as LockTheFolder() even while the waitFunction is waiting for events.

Is there a way where i can start the Monitor function which keeps on running in the background while some other functions are performed??

Im very new to c++ programming and this may be a very very dumb question but please help..its urgent!!

HeartBreakKid
June 12th, 2003, 08:15 AM
You need a thread....check out the FAQs.

Threads

How to create a worker thread? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231241)
How to end a thread? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231242)
How to use member functions as thread functions? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231246)
How to access UI elements from a thread in MFC? (http://www.codeguru.com/forum/showthread.php?s=&threadid=231250)