#pragma once class CFileChangeNotification { public: enum{ eThread_State_Enabled = 0, // ½º·¹µå°¡ Ȱ¼ºÈ­ °¡´É ÇÑ »óÅ eThread_State_Executing, // ½º·¹µå°¡ µ¿ÀÛ ÇÏ´Â »óÅ eThread_State_Request_Destroy, // ½º·¹µå Á¾·á ¿äû »óÅ eThread_State_Enable_Destroy, // ½º·¹µå°¡ Á¾·á µÉ ¼ö ÀÖ´Â »óÅ }; public: CFileChangeNotification(); virtual ~CFileChangeNotification(); protected: static HANDLE s_hThreadHandle; static int s_nThreadStatus; UINT m_dwThreadIndex; static std::wstring m_wszPath; static bool m_bSubTree; static DWORD m_FilterFlag; static UINT __stdcall ChangeNotification( void *pParam ); public: void StartFileChangeNotification( WCHAR * wszPath, bool bSubTree = false, DWORD FilterFlag = FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS ); void EndFileChangeNotification(); };