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.

73 lines
2.0 KiB

  1. //
  2. // MODULE: LaunchTS.h
  3. //
  4. // PURPOSE: The interface that TSHOOT.OCX uses to get network and node information
  5. // from the LaunchServ.
  6. //
  7. // PROJECT: Local Troubleshooter Launcher for the Device Manager
  8. //
  9. // COMPANY: Saltmine Creative, Inc. (206)-633-4743 [email protected]
  10. //
  11. // AUTHOR: Richard Meadows
  12. //
  13. // ORIGINAL DATE: 2-26-98
  14. //
  15. //
  16. // Version Date By Comments
  17. //--------------------------------------------------------------------
  18. // V0.1 - RM Original
  19. ///////////////////////
  20. #ifndef __LAUNCHTS_H_
  21. #define __LAUNCHTS_H_
  22. #include "resource.h" // main symbols
  23. #include "stdio.h"
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CLaunchTS
  26. class ATL_NO_VTABLE CLaunchTS :
  27. public CComObjectRootEx<CComSingleThreadModel>,
  28. public CComCoClass<CLaunchTS, &CLSID_LaunchTS>,
  29. public IObjectWithSiteImpl<CLaunchTS>,
  30. public IDispatchImpl<ILaunchTS, &IID_ILaunchTS, &LIBID_LAUNCHSERVLib>
  31. {
  32. public:
  33. CLaunchTS()
  34. {
  35. _stprintf(m_szEvent, _T("Event "));
  36. m_csThreadSafeBr.Init();
  37. }
  38. ~CLaunchTS()
  39. {
  40. m_csThreadSafeBr.Term();
  41. }
  42. DECLARE_REGISTRY_RESOURCEID(IDR_LAUNCHTS)
  43. BEGIN_COM_MAP(CLaunchTS)
  44. COM_INTERFACE_ENTRY(ILaunchTS)
  45. COM_INTERFACE_ENTRY(IDispatch)
  46. COM_INTERFACE_ENTRY_IMPL(IObjectWithSite)
  47. END_COM_MAP()
  48. TCHAR m_szEvent[50];
  49. CItem m_refedLaunchState; // Used only by the process that is created by the Go method.
  50. CComCriticalSection m_csThreadSafeBr;
  51. // ILaunchTS
  52. public:
  53. STDMETHOD(Test)();
  54. STDMETHOD(GetState)(/*[in]*/ short iNode, /*[out, retval]*/ BSTR *pbstrState);
  55. STDMETHOD(GetNode)(/*[in]*/ short iNode, /*[out, retval]*/ BSTR *pbstrNode);
  56. STDMETHOD(GetProblem)(/*[out, retval]*/ BSTR *pbstrProblem);
  57. STDMETHOD(GetTroubleShooter)(/*[out, retval]*/ BSTR *pbstrShooter);
  58. STDMETHOD(GetShooterStates)(/*[out, retval]*/ DWORD *pdwResult);
  59. STDMETHOD(GetMachine)(/*[out, retval]*/ BSTR *pbstrMachine);
  60. STDMETHOD(GetPNPDevice)(/*[out, retval]*/ BSTR *pbstr);
  61. STDMETHOD(GetGuidClass)(/*[out, retval]*/ BSTR *pbstr);
  62. STDMETHOD(GetDeviceInstance)(/*[out, retval]*/ BSTR *pbstr);
  63. };
  64. #endif //__LAUNCHTS_H_