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.

153 lines
3.3 KiB

  1. // tsdgns.h : Declaration of the CTSDiagnosis
  2. #ifndef __TSDIAGNOSIS_H_
  3. #define __TSDIAGNOSIS_H_
  4. // #import "F:\nt\termsrv\setup\tsdiag\dll\obj\i386\tsdiag.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids
  5. // #import "tsdiag.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids
  6. #include "resource.h" // main symbols
  7. #include "testdata.h" // for CTSTestData
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CTSDiagnosis
  10. class ATL_NO_VTABLE CTSDiagnosis :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public CComCoClass<CTSDiagnosis, &CLSID_TSDiagnosis>,
  13. public IDispatchImpl<ITSDiagnosis, &IID_ITSDiagnosis, &LIBID_TSDIAGLib>,
  14. public IDispatchImpl<ITSDiagnosis2, &IID_ITSDiagnosis2, &LIBID_TSDIAGLib>
  15. {
  16. enum
  17. {
  18. eFailed = 0,
  19. ePassed = 1,
  20. eUnknown = 2
  21. };
  22. public:
  23. CTSDiagnosis();
  24. ~CTSDiagnosis();
  25. DECLARE_REGISTRY_RESOURCEID(IDR_TSDIAGNOSIS)
  26. DECLARE_PROTECT_FINAL_CONSTRUCT()
  27. BEGIN_COM_MAP(CTSDiagnosis)
  28. COM_INTERFACE_ENTRY(ITSDiagnosis2)
  29. COM_INTERFACE_ENTRY(ITSDiagnosis)
  30. COM_INTERFACE_ENTRY2(IDispatch, ITSDiagnosis2)
  31. COM_INTERFACE_ENTRY2(IDispatch, ITSDiagnosis)
  32. END_COM_MAP()
  33. // ITSDiagnosis
  34. public:
  35. STDMETHOD(ExecuteIt)(BSTR strCommand);
  36. STDMETHOD(get_TestDetails)(int i, /*[out, retval]*/ BSTR *pVal);
  37. STDMETHOD(put_TestType)(/*[in]*/ VARIANT newVal);
  38. STDMETHOD(get_TestResult)(/*[out, retval]*/ long *pVal);
  39. STDMETHOD(get_TestResultString)(/*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(RunTest)(int i);
  41. STDMETHOD(get_TestDescription)(int i, /*[out, retval]*/ BSTR *pVal);
  42. STDMETHOD(get_TestCount)(/*[out, retval]*/ long *pVal);
  43. STDMETHOD(get_TestApplicable)(int i, /*[out, retval]*/ BOOL *pbApplicable);
  44. STDMETHOD(put_RemoteMachineName)(BSTR newVal);
  45. STDMETHOD(get_SuiteApplicable) (DWORD dw, BOOL *pVal);
  46. STDMETHOD(get_SuiteErrorText) (DWORD dw, BSTR *pVal);
  47. public:
  48. // ITSDiagnosis2
  49. STDMETHOD(ExecuteCommand)(BSTR strCommand);
  50. STDMETHOD(put_MachineName)(/*[in]*/ BSTR newVal);
  51. STDMETHOD(get_Suites)(/*[out, retval]*/ VARIANT *pVal);
  52. private:
  53. DWORD GetTotalTestCount ();
  54. bstr_t m_bstrTestResultString;
  55. long m_lTestResult;
  56. // CTSTestData m_TSTests;
  57. DWORD m_dwSuite;
  58. /*
  59. // ITSDiagnosis
  60. STDMETHOD(get_TestCount)(LONG * pVal)
  61. {
  62. if (pVal == NULL)
  63. return E_POINTER;
  64. return E_NOTIMPL;
  65. }
  66. STDMETHOD(get_TestDescription)(INT i, BSTR * pVal)
  67. {
  68. if (pVal == NULL)
  69. return E_POINTER;
  70. return E_NOTIMPL;
  71. }
  72. STDMETHOD(get_TestApplicable)(INT i, LONG * pVal)
  73. {
  74. if (pVal == NULL)
  75. return E_POINTER;
  76. return E_NOTIMPL;
  77. }
  78. STDMETHOD(RunTest)(INT i)
  79. {
  80. return E_NOTIMPL;
  81. }
  82. STDMETHOD(get_TestResult)(LONG * pVal)
  83. {
  84. if (pVal == NULL)
  85. return E_POINTER;
  86. return E_NOTIMPL;
  87. }
  88. STDMETHOD(get_TestDetails)(INT i, BSTR * pVal)
  89. {
  90. if (pVal == NULL)
  91. return E_POINTER;
  92. return E_NOTIMPL;
  93. }
  94. STDMETHOD(get_SuiteApplicable)(ULONG dwSuite, LONG * pVal)
  95. {
  96. if (pVal == NULL)
  97. return E_POINTER;
  98. return E_NOTIMPL;
  99. }
  100. STDMETHOD(get_SuiteErrorText)(ULONG dwSuite, BSTR * pVal)
  101. {
  102. if (pVal == NULL)
  103. return E_POINTER;
  104. return E_NOTIMPL;
  105. }
  106. // ITSDiagnosis2
  107. STDMETHOD(ExecuteCommand)(BSTR strCommand)
  108. {
  109. return E_NOTIMPL;
  110. }
  111. STDMETHOD(MachineName)(BSTR newVal);
  112. {
  113. return E_NOTIMPL;
  114. }
  115. STDMETHOD(Suites)(VARIANT *pVal);
  116. {
  117. if (pVal == NULL)
  118. return E_POINTER;
  119. return E_NOTIMPL;
  120. }
  121. */
  122. };
  123. #endif //__TSDIAGNOSIS_H_