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.

82 lines
2.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation
  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. #pragma once
  18. //////////////////////////////////////////////////////////////////////////////
  19. // BEGIN INCLUDES
  20. //
  21. // where we can find what this class derives from:
  22. //
  23. #include <vector>
  24. //
  25. // where we can find what this class has or uses:
  26. //
  27. #include <utility> // For "pair"
  28. //
  29. // END INCLUDES
  30. //////////////////////////////////////////////////////////////////////////////
  31. typedef std::pair< CComBSTR, LONG > VendorPair;
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CIASGroupAttributeEditor
  34. class ATL_NO_VTABLE CIASNASVendors :
  35. public CComObjectRootEx<CComSingleThreadModel>
  36. , public CComCoClass<CIASNASVendors, &CLSID_IASNASVendors>
  37. , public IDispatchImpl<IIASNASVendors, &IID_IIASNASVendors, &LIBID_NAPMMCLib>
  38. , std::vector< VendorPair >
  39. {
  40. public:
  41. CIASNASVendors();
  42. DECLARE_NO_REGISTRY()
  43. DECLARE_CLASSFACTORY_SINGLETON(CIASNASVendors)
  44. BEGIN_COM_MAP(CIASNASVendors)
  45. COM_INTERFACE_ENTRY(IIASNASVendors)
  46. COM_INTERFACE_ENTRY(IDispatch)
  47. END_COM_MAP()
  48. // IIASNASVendors:
  49. public:
  50. STDMETHOD( InitFromSdo )( /* [in] */ ISdoCollection *pSdoVendorsCollection );
  51. STDMETHOD( get_Size )( /* [retval][out] */ long *plCount );
  52. STDMETHOD( get_VendorName )( long lIndex, /* [retval][out] */ BSTR *pbstrVendorName );
  53. STDMETHOD( get_VendorID )( long lIndex, /* [retval][out] */ long *plVendorID );
  54. STDMETHOD( get_VendorIDToOrdinal )( long lVendorID, /* [retval][out] */ long *plIndex );
  55. protected:
  56. BOOL m_bUninitialized;
  57. };
  58. HRESULT MakeVendorNameFromVendorID(DWORD dwVendorId, BSTR* pbstrVendorName );
  59. #endif // _NAS_VENDORS_H_