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.

74 lines
2.7 KiB

  1. //
  2. // MODULE: TShootATL.cpp
  3. //
  4. // PURPOSE: The interface that device manager uses to launch troubleshooters.
  5. //
  6. // PROJECT: Local Troubleshooter Launcher for the Device Manager
  7. //
  8. // COMPANY: Saltmine Creative, Inc. (206)-633-4743 [email protected]
  9. //
  10. // AUTHOR: Richard Meadows
  11. //
  12. // ORIGINAL DATE: 2-26-98
  13. //
  14. //
  15. // Version Date By Comments
  16. //--------------------------------------------------------------------
  17. // V0.1 - RM Original
  18. ///////////////////////
  19. #ifndef __TSHOOTATL_H_
  20. #define __TSHOOTATL_H_
  21. #include "resource.h" // main symbols
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CTShootATL
  24. class ATL_NO_VTABLE CTShootATL :
  25. public CComObjectRootEx<CComSingleThreadModel>,
  26. public CComCoClass<CTShootATL, &CLSID_TShootATL>,
  27. public IObjectWithSiteImpl<CTShootATL>,
  28. public IDispatchImpl<ITShootATL, &IID_ITShootATL, &LIBID_LAUNCHSERVLib>
  29. {
  30. public:
  31. CTShootATL()
  32. {
  33. m_csThreadSafe.Init();
  34. }
  35. ~CTShootATL()
  36. {
  37. m_csThreadSafe.Term();
  38. }
  39. DECLARE_REGISTRY_RESOURCEID(IDR_TSHOOTATL)
  40. BEGIN_COM_MAP(CTShootATL)
  41. COM_INTERFACE_ENTRY(ITShootATL)
  42. COM_INTERFACE_ENTRY(IDispatch)
  43. COM_INTERFACE_ENTRY_IMPL(IObjectWithSite)
  44. END_COM_MAP()
  45. protected:
  46. CLaunch m_Launcher; // The real implementation.
  47. CComCriticalSection m_csThreadSafe; // For minimal thread safety. I expect that the interface will be used by only one thread per CoCreateInstance call.
  48. // ITShootATL
  49. public:
  50. STDMETHOD(GetStatus)(/*[out, retval]*/ DWORD *pdwStatus);
  51. STDMETHOD(get_PreferOnline)(/*[out, retval]*/ BOOL *pVal);
  52. STDMETHOD(put_PreferOnline)(/*[in]*/ BOOL newVal);
  53. STDMETHOD(LaunchDevice)(/*[in]*/ BSTR bstrCallerName, /*[in]*/ BSTR bstrCallerVersion, /*[in]*/ BSTR bstrPNPDeviceID, /*[in]*/ BSTR bstrDeviceClassGUID, /*[in]*/ BSTR bstrAppProblem, /*[in]*/ short bLaunch, /*[out, retval]*/ DWORD *pdwResult);
  54. STDMETHOD(Launch)(/*[in]*/ BSTR bstrCallerName, /*[in]*/ BSTR bstrCallerVersion, /*[in]*/ BSTR bstrAppProblem, /*[in]*/ short bLaunch, /*[out, retval]*/ DWORD *pdwResult);
  55. STDMETHOD(get_LaunchWaitTimeOut)(/*[out, retval]*/ long *pVal);
  56. STDMETHOD(put_LaunchWaitTimeOut)(/*[in]*/ long newVal);
  57. STDMETHOD(LaunchKnown)(/*[out, retval]*/ DWORD *pdwResult);
  58. STDMETHOD(ReInit)();
  59. STDMETHOD(DeviceInstanceID)(/*[in]*/BSTR bstrDeviceInstanceID, /*[out, retval]*/DWORD * pdwResult);
  60. STDMETHOD(Test)();
  61. STDMETHOD(MachineID)(/*[in]*/ BSTR bstrMachineID, /*[out, retval]*/ DWORD *pdwResult);
  62. STDMETHOD(Language)(/*[in]*/ BSTR bstrLanguage, /*[out, retval]*/ DWORD *pdwResult);
  63. STDMETHOD(SetNode)(/*[in]*/ BSTR bstrName, /*[in]*/ BSTR bstrState, /*[out, retval]*/ DWORD *pdwResult);
  64. STDMETHOD(SpecifyProblem)(/*[in]*/ BSTR bstrNetwork, /*[in]*/ BSTR bstrProblem, /*[out, retval]*/ DWORD *pdwResult);
  65. };
  66. #endif //__TSHOOTATL_H_