Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. #ifndef __SCRIPT_KILLER_COMPILED__
  2. #define __SCRIPT_KILLER_COMPILED__
  3. #include <activscp.h>
  4. #include "KillTimer.h"
  5. // only need one of these laying around
  6. class CScriptKillerTimer;
  7. extern CScriptKillerTimer g_scriptKillerTimer;
  8. // specialized to kill scripts
  9. class CScriptKillerTimer : public CKillerTimer
  10. {
  11. public:
  12. // who to kill & when
  13. HRESULT ScheduleAssassination(IActiveScript* pScript, FILETIME lastMeal, SCRIPTTHREADID threadID);
  14. // HRESULT ScheduleAssassination(LPSTREAM pStream, FILETIME lastMeal, SCRIPTTHREADID threadID);
  15. };
  16. /* CLASS CScriptKiller DEFINITION */
  17. // hold script that needs to be killed
  18. class CScriptKiller : public CKiller
  19. {
  20. public:
  21. CScriptKiller(IActiveScript* pScript, FILETIME deathDate, SCRIPTTHREADID threadID, CLifeControl* pControl) :
  22. CKiller(deathDate, pControl), m_pScript(pScript) /*m_pStream(pStream)*/, m_threadID(threadID)
  23. {
  24. m_pScript->AddRef();
  25. }
  26. virtual ~CScriptKiller()
  27. {
  28. m_pScript->Release();
  29. }
  30. // terminate process,
  31. virtual void Die();
  32. protected:
  33. private:
  34. IActiveScript* m_pScript;
  35. // LPSTREAM m_pStream;
  36. SCRIPTTHREADID m_threadID;
  37. };
  38. #endif //__SCRIPT_KILLER_COMPILED__