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.

89 lines
2.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1998 - 1999
  4. Module Name:
  5. Vendors.h
  6. Abstract:
  7. Declaration of the CIASNASVendors class.
  8. This class is the C++ implementation of the IIASNASVendors interface on
  9. the NASVendors COM object.
  10. See Vendors.cpp for implementation.
  11. Revision History:
  12. mmaguire 11/04/98 - created
  13. --*/
  14. //////////////////////////////////////////////////////////////////////////////
  15. #if !defined(_NAS_VENDORS_H_)
  16. #define _NAS_VENDORS_H_
  17. //////////////////////////////////////////////////////////////////////////////
  18. // BEGIN INCLUDES
  19. //
  20. // where we can find what this class derives from:
  21. //
  22. #include <vector>
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. #include <utility> // For "pair"
  27. //
  28. // END INCLUDES
  29. //////////////////////////////////////////////////////////////////////////////
  30. typedef std::pair< CComBSTR, LONG > VendorPair;
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CIASGroupAttributeEditor
  33. class ATL_NO_VTABLE CIASNASVendors :
  34. public CComObjectRootEx<CComSingleThreadModel>
  35. , public CComCoClass<CIASNASVendors, &CLSID_IASNASVendors>
  36. , public IDispatchImpl<IIASNASVendors, &IID_IIASNASVendors, &LIBID_NAPMMCLib>
  37. , std::vector< VendorPair >
  38. {
  39. public:
  40. CIASNASVendors();
  41. DECLARE_REGISTRY_RESOURCEID(IDR_NAPSNAPIN)
  42. DECLARE_CLASSFACTORY_SINGLETON(CIASNASVendors)
  43. BEGIN_COM_MAP(CIASNASVendors)
  44. COM_INTERFACE_ENTRY(IIASNASVendors)
  45. COM_INTERFACE_ENTRY(IDispatch)
  46. END_COM_MAP()
  47. // IIASNASVendors:
  48. public:
  49. STDMETHOD( InitFromSdo )( /* [in] */ ISdoCollection *pSdoVendorsCollection );
  50. STDMETHOD( get_Size )( /* [retval][out] */ long *plCount );
  51. STDMETHOD( get_VendorName )( long lIndex, /* [retval][out] */ BSTR *pbstrVendorName );
  52. STDMETHOD( get_VendorID )( long lIndex, /* [retval][out] */ long *plVendorID );
  53. STDMETHOD( get_VendorIDToOrdinal )( long lVendorID, /* [retval][out] */ long *plIndex );
  54. protected:
  55. BOOL m_bUninitialized;
  56. };
  57. HRESULT MakeVendorNameFromVendorID(DWORD dwVendorId, BSTR* pbstrVendorName );
  58. #endif // _NAS_VENDORS_H_