// waitforsingleobject will check the first parameter,
// if it is signaled,the loop will break.
//
if(waitforsingleobject(pevent->m_hobject,0)==wait_object_0)
return (uint) -1;
waitforsingleobject(dwchangehandles[1],infinite);
postmessage (hwnd,wm_user_thread_file_changed,0,0);
findnextchangenotification(dwchangehandles);
---------------------------------------------------------------------------*/
//
// wait for notification.
//
dwwaitstatus = waitformultipleobjects(3, dwchangehandles,
false, infinite);
if (dwwaitstatus == wait_object_0 + 2) return (uint) -1;
switch (dwwaitstatus)
{
case wait_object_0:
//
// a file was created or deleted in c:\windows.
// refresh this directory and restart the
// change notification. refreshdirectory is an
// application-defined function.
//
postmessage (hwnd,wm_user_thread_file_changed,0,0);
findnextchangenotification(dwchangehandles[0]);
break;
case wait_object_0 + 1:
//
// a directory was created or deleted in c:\.
// refresh the directory tree and restart the
// change notification. refreshtree is an
// application-defined function.
//
postmessage (hwnd,wm_user_thread_file_changed,0,0);
findnextchangenotification( dwchangehandles[1]);
break;
}
}
delete[] dwchangehandles;
return 0;
}
//---------------------------------------------------------------------------------------
//
// function: long cmainwindow::onfilechanged(wparam wparam, lparam lparam)
// purpose:
// comments:
//---------------------------------------------------------------------------------------
long cmainwindow::onfilechanged(wparam wparam, lparam lparam)
{
//
// add process sentence if file changed here.
//
return 0;