Leaked source code of windows server 2003
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.9 KiB

  1. /*-----------------------------------------------------------------------------
  2. *
  3. * File: wiadevinf.h
  4. * Author: Samuel Clement (samclem)
  5. * Date: Fri Aug 13 14:48:39 1999
  6. * Description:
  7. * This defines the CWiaDeviceInfo object. This class provides the scripting
  8. * interface to IWiaPropertyStorage on the devices.
  9. *
  10. * History:
  11. * 13 Aug 1999: Created.
  12. *----------------------------------------------------------------------------*/
  13. #ifndef _WIADEVINF_H_
  14. #define _WIADEVINF_H_
  15. /*-----------------------------------------------------------------------------
  16. *
  17. * Class: CWiaDeviceInfo
  18. * Syniosis: Acts a proxy between scripting and the device properties
  19. *
  20. *--(samclem)-----------------------------------------------------------------*/
  21. class ATL_NO_VTABLE CWiaDeviceInfo :
  22. public CComObjectRootEx<CComSingleThreadModel>,
  23. public IDispatchImpl<IWiaDeviceInfo, &IID_IWiaDeviceInfo, &LIBID_WIALib>,
  24. public IObjectSafetyImpl<CWiaDeviceInfo, INTERFACESAFE_FOR_UNTRUSTED_CALLER>
  25. {
  26. public:
  27. CWiaDeviceInfo();
  28. DECLARE_TRACKED_OBJECT
  29. DECLARE_NO_REGISTRY()
  30. DECLARE_PROTECT_FINAL_CONSTRUCT()
  31. STDMETHOD_(void, FinalRelease)();
  32. BEGIN_COM_MAP(CWiaDeviceInfo)
  33. COM_INTERFACE_ENTRY(IWiaDeviceInfo)
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. END_COM_MAP()
  36. // Non-interface methods for internal use
  37. HRESULT AttachTo( IWiaPropertyStorage* pStg, IWia* pWia );
  38. // IWiaDeviceInfo
  39. STDMETHOD(Create)( IWiaDispatchItem** ppDevice );
  40. STDMETHOD(get_Id)( BSTR* pbstrDeviceId );
  41. STDMETHOD(get_Name)( BSTR* pbstrName );
  42. STDMETHOD(get_Type)( BSTR* pbstrType );
  43. STDMETHOD(get_Port)( BSTR* pbstrPort );
  44. STDMETHOD(get_UIClsid)( BSTR* pbstrGuidUI );
  45. STDMETHOD(get_Manufacturer)( BSTR* pbstrVendor );
  46. STDMETHOD(GetPropById)( WiaDeviceInfoPropertyId Id, VARIANT* pvaOut );
  47. protected:
  48. IWiaPropertyStorage* m_pWiaStorage;
  49. IWia* m_pWia;
  50. };
  51. #endif //_WIADEVINF_H_