Back

// PSLIPv6.h : Declaration of the CPSLIPv6

#pragma once
#include "resource.h"       // main symbols
#include "GUIDs.h"
#include "PSLExceptions.h"
#include "ProSysLib_i.h"

class ATL_NO_VTABLE CPSLIPv6:
   public CComObjectRootEx<CComMultiThreadModel>,
   public CComCoClass<CPSLIPv6, &CLSID_PSLIPv6>,
   public IDispatchImpl<IPSLIPv6, &IID_IPSLIPv6, &LIBID_ProSysLib, PSL_HiVersion, PSL_LoVersion>,
   public CPSLException<&CLSID_PSLIPv6, &IID_IPSLIPv6>
{
public:

   CPSLIPv6();

   bool Initialize(LPCTSTR sIP, bool bCreating);

BEGIN_COM_MAP(CPSLIPv6)
   COM_INTERFACE_ENTRY(IPSLIPv6)
   COM_INTERFACE_ENTRY(IDispatch)
   COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()

   DECLARE_PROTECT_FINAL_CONSTRUCT()
   HRESULT FinalConstruct();
   void FinalRelease();

////////////////////////////
// Interface Implementation:
////////////////////////////

   STDMETHOD(get_A1)(long * pValue);
   STDMETHOD(put_A1)(long newValue);
   STDMETHOD(get_A2)(long * pValue);
   STDMETHOD(put_A2)(long newValue);
   STDMETHOD(get_A3)(long * pValue);
   STDMETHOD(put_A3)(long newValue);
   STDMETHOD(get_A4)(long * pValue);
   STDMETHOD(put_A4)(long newValue);
   STDMETHOD(get_A5)(long * pValue);
   STDMETHOD(put_A5)(long newValue);
   STDMETHOD(get_A6)(long * pValue);
   STDMETHOD(put_A6)(long newValue);
   STDMETHOD(get_A7)(long * pValue);
   STDMETHOD(put_A7)(long newValue);
   STDMETHOD(get_A8)(long * pValue);
   STDMETHOD(put_A8)(long newValue);
   STDMETHOD(get_Port)(long * pValue);
   STDMETHOD(put_Port)(long newValue);
   STDMETHOD(get_Prefix)(long * pValue);
   STDMETHOD(put_Prefix)(long newValue);
   STDMETHOD(get_Text)(BSTR * pValue);
   STDMETHOD(put_Text)(BSTR newValue);
   STDMETHOD(get_Format)(PSLIPv6Format * pValue);
   STDMETHOD(put_Format)(PSLIPv6Format newValue);
   STDMETHOD(Clear)(VARIANT_BOOL bClearFormat);

private:

   _bstr_t GetIPName();

   USHORT m_uAddr[8]; // 8 address values;
   USHORT m_uPort;
   USHORT m_uPrefix;
   PSLIPv6Format m_Format;
};

Top