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.

62 lines
1.8 KiB

  1. // Test.h: interface for the CTest class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_TEST_H__3761055A_21CF_4689_908F_1758001D332D__INCLUDED_)
  5. #define AFX_TEST_H__3761055A_21CF_4689_908F_1758001D332D__INCLUDED_
  6. //#import "F:\nt\termsrv\setup\tsdiag\dll\obj\i386\tsdiag.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids
  7. //#import "tsdiag.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids
  8. #include "resource.h" // main symbols
  9. #include "testdata.h" // for CTSTestData
  10. #include "tstst.h"
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif // _MSC_VER > 1000
  14. class ATL_NO_VTABLE CTest :
  15. public CComObjectRootEx<CComSingleThreadModel>,
  16. // public CComCoClass<CTest, &CLSID_TSDiagnosis>,
  17. public IDispatchImpl<ITest, &IID_ITest, &LIBID_TSDIAGLib>
  18. {
  19. public:
  20. CTest();
  21. virtual ~CTest();
  22. DECLARE_NO_REGISTRY()
  23. DECLARE_PROTECT_FINAL_CONSTRUCT()
  24. BEGIN_COM_MAP(CTest)
  25. COM_INTERFACE_ENTRY(ITest)
  26. COM_INTERFACE_ENTRY2(IDispatch, ITest)
  27. END_COM_MAP()
  28. // ITest
  29. public:
  30. STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
  31. STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pVal);
  32. STDMETHOD(get_IsApplicable)(/*[out, retval]*/ BOOL *pVal);
  33. STDMETHOD(get_WhyNotApplicable)(/*[out, retval]*/ BSTR *pVal);
  34. STDMETHOD(Execute)();
  35. STDMETHOD(get_Result)(/*[out, retval]*/ long *pVal);
  36. STDMETHOD(get_ResultString)(/*[out, retval]*/ BSTR *pVal);
  37. STDMETHOD(get_ResultDetails)(/*[out, retval]*/ BSTR *pVal);
  38. void SetTest(PTVerificationTest ptheTest) { m_pTest = ptheTest;}
  39. private:
  40. bool m_bTestRun;
  41. EResult m_eResult;
  42. bstr_t m_bstrResult;
  43. bstr_t m_bDetails;
  44. PTVerificationTest m_pTest;
  45. bool IsValid() const { return m_pTest != NULL;};
  46. };
  47. #endif // !defined(AFX_TEST_H__3761055A_21CF_4689_908F_1758001D332D__INCLUDED_)