ATL Development   «Prev 

Adding a read-write property

CPhBookObj

class CPhBookObj : 
  public IReadPhBook,
  public IManagePhBook,
  public CComObjectRoot,
  public CComCoClass < CPhBookObj,&CLSID_PhBookObj>
{
public:
  CPhBookObj() {}
BEGIN_COM_MAP(CPhBookObj)
  COM_INTERFACE_ENTRY(IReadPhBook)
  COM_INTERFACE_ENTRY(IManagePhBook)
END_COM_MAP()

Microsoft Visual C++ Windows Applications
DECLARE_REGISTRY_RESOURCEID(IDR_PhBookObj)

public:

  STDMETHOD(get_CurRec)(/*
    [out, retval]*/ long *pVal);
    
  STDMETHOD(put_CurRec)(/*
    [in]*/ long newVal);
};