//--------------------------------------------------------------------------- #ifndef TThreadPollingFH #define TThreadPollingFH //--------------------------------------------------------------------------- #include #include #include #include #include #include //--------------------------------------------------------------------------- class TThreadPolling : public TThread { protected: void __fastcall Execute(); private: TADOConnection *m_pConnection; HWND m_lMainWinHandle; String m_sDbConnString; bool __fastcall DbConnect(); bool __fastcall IsDbOpen() { if (m_pConnection) return m_pConnection->Connected; else return false; }; void __fastcall DbClose() { if (IsDbOpen()) m_pConnection->Close(); }; bool __fastcall IsDbDisconnected(); public: __fastcall TThreadPolling(bool CreateSuspended); __fastcall ~TThreadPolling(); public: bool __fastcall SelProcessStatusData(LPARAM LParam); bool __fastcall SelCctvStatusData(LPARAM LParam); bool __fastcall SelIncidentData(LPARAM LParam); }; //--------------------------------------------------------------------------- #endif