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.

37 lines
909 B

  1. #ifndef __NICNAME_H_
  2. #define __NICNAME_H_
  3. #include "resource.h" // main symbols
  4. #include "NicInfo.h"
  5. #include <vector>
  6. using namespace std;
  7. class ATL_NO_VTABLE CNicName :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public CComCoClass<CNicName, &CLSID_NicName>,
  10. public IDispatchImpl<INicName, &IID_INicName, &LIBID_MSSANICLib>
  11. {
  12. public:
  13. CNicName();
  14. DECLARE_REGISTRY_RESOURCEID(IDR_NICNAME)
  15. DECLARE_PROTECT_FINAL_CONSTRUCT()
  16. BEGIN_COM_MAP(CNicName)
  17. COM_INTERFACE_ENTRY(INicName)
  18. COM_INTERFACE_ENTRY(IDispatch)
  19. END_COM_MAP()
  20. // INicName
  21. public:
  22. STDMETHOD(Set)(/*[in]*/ BSTR bstrPnpDeviceID, BSTR bstrName);
  23. STDMETHOD(Get)(/*[in]*/ BSTR bstrPnpDeviceID, /*[out,retval]*/ BSTR* pbstrFriendlyName);
  24. private:
  25. DWORD Store(CNicInfo& rNicInfo);
  26. void LoadNicInfo();
  27. vector<CNicInfo> m_vNicInfo;
  28. };
  29. #endif //__NICNAME_H_