ATL Development   «Prev 

Adding read-only properties

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()


DECLARE_REGISTRY_RESOURCEID(IDR_PhBookObj)

public:

  STDMETHOD(get_NumRecs)(/*[out, retval]*/
    long *pVal);
  STDMETHOD(get_MaxRecs)(/*[out, retval]*/
    long *pVal);

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