Source code of Windows XP (NT5)
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.

111 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. appobj.h
  5. Abstract:
  6. OLE-createable application object implementation.
  7. Author:
  8. Don Ryan (donryan) 27-Dec-1994
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. Jeff Parham (jeffparh) 16-Jan-1996
  13. Added Get/SetLastTargetServer() to help isolate server connection
  14. problems. (Bug #2993.)
  15. --*/
  16. #ifndef _APPOBJ_H_
  17. #define _APPOBJ_H_
  18. class CApplication : public CCmdTarget
  19. {
  20. DECLARE_DYNCREATE(CApplication)
  21. DECLARE_OLECREATE(CApplication)
  22. private:
  23. CObArray m_domainArray;
  24. CDomain* m_pLocalDomain;
  25. CDomain* m_pActiveDomain;
  26. CController* m_pActiveController;
  27. BOOL m_bIsFocusDomain;
  28. BOOL m_bDomainsRefreshed;
  29. long m_idStatus;
  30. CString m_strLastTargetServer;
  31. public:
  32. CDomains* m_pDomains;
  33. public:
  34. CApplication();
  35. virtual ~CApplication();
  36. void ResetDomains();
  37. BOOL RefreshDomains();
  38. long GetLastStatus();
  39. void SetLastStatus(long Status);
  40. BSTR GetLastTargetServer();
  41. void SetLastTargetServer( LPCTSTR pszServerName );
  42. BOOL IsConnected();
  43. LPVOID GetActiveHandle();
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CApplication)
  46. public:
  47. virtual void OnFinalRelease();
  48. //}}AFX_VIRTUAL
  49. // Generated OLE dispatch map functions
  50. //{{AFX_DISPATCH(CApplication)
  51. afx_msg LPDISPATCH GetApplication();
  52. afx_msg BSTR GetFullName();
  53. afx_msg BSTR GetName();
  54. afx_msg LPDISPATCH GetParent();
  55. afx_msg BOOL GetVisible();
  56. afx_msg LPDISPATCH GetActiveController();
  57. afx_msg LPDISPATCH GetActiveDomain();
  58. afx_msg LPDISPATCH GetLocalDomain();
  59. afx_msg BOOL IsFocusDomain();
  60. afx_msg BSTR GetLastErrorString();
  61. afx_msg void Quit();
  62. afx_msg BOOL SelectDomain(const VARIANT FAR& domain);
  63. afx_msg BOOL SelectEnterprise();
  64. afx_msg LPDISPATCH GetDomains(const VARIANT FAR& index);
  65. //}}AFX_DISPATCH
  66. DECLARE_DISPATCH_MAP()
  67. protected:
  68. // Generated message map functions
  69. //{{AFX_MSG(CApplication)
  70. // NOTE - the ClassWizard will add and remove member functions here.
  71. //}}AFX_MSG
  72. DECLARE_MESSAGE_MAP()
  73. };
  74. inline BOOL CApplication::IsConnected()
  75. { ASSERT_VALID(m_pActiveController); return m_pActiveController->IsConnected(); }
  76. inline LPVOID CApplication::GetActiveHandle()
  77. { ASSERT_VALID(m_pActiveController); return m_pActiveController->GetLlsHandle(); }
  78. inline void CApplication::SetLastStatus(long Status)
  79. { m_idStatus = Status; }
  80. inline long CApplication::GetLastStatus()
  81. { return m_idStatus; }
  82. #endif // _APPOBJ_H_