DragonNest/Client/EtActionTool/FileChangeNotification.h

31 lines
833 B
C
Raw Normal View History

2024-12-19 09:48:26 +08:00
#pragma once
class CFileChangeNotification
{
public:
enum{
eThread_State_Enabled = 0, // <20><><EFBFBD><EFBFBD><EFBFBD>尡 Ȱ<><C8B0>ȭ <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
eThread_State_Executing, // <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
eThread_State_Request_Destroy, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û <20><><EFBFBD><EFBFBD>
eThread_State_Enable_Destroy, // <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
};
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();
};