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.

71 lines
1.3 KiB

  1. //____________________________________________________________________________
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  5. //
  6. // File: jobpages.hxx
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 3/5/1996 RaviR Created
  15. //
  16. //____________________________________________________________________________
  17. #define MAX_PROP_PAGES 20
  18. class CSharedInfo
  19. {
  20. public:
  21. CSharedInfo();
  22. ~CSharedInfo();
  23. HRESULT Init(LPTSTR pszJobPath, ITask * pIJob);
  24. int m_cRef; // ref count
  25. void AddRef() { ++m_cRef; }
  26. void Release() { --m_cRef; if (m_cRef == 0) delete this; }
  27. LPTSTR m_pszName; // Job name
  28. ITask * m_pIJob; // this keeps the job in memory.
  29. HICON m_hiconJob;
  30. BOOL m_fShowMultiScheds;
  31. };
  32. inline
  33. CSharedInfo::CSharedInfo()
  34. :
  35. m_cRef(1),
  36. m_pszName(NULL),
  37. m_pIJob(NULL),
  38. m_hiconJob(NULL),
  39. m_fShowMultiScheds(FALSE) // initialy show only a single schedule
  40. {
  41. ;
  42. }
  43. inline
  44. CSharedInfo::~CSharedInfo()
  45. {
  46. if (m_pIJob != NULL)
  47. {
  48. m_pIJob->Release();
  49. }
  50. if (m_hiconJob != NULL)
  51. {
  52. DestroyIcon(m_hiconJob);
  53. }
  54. delete m_pszName;
  55. }