OOPortal OOPortal


ATL Development   «Prev 

Class CPhBookObj

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

DECLARE_REGISTRY_RESOURCEID(IDR_PhBookObj)

public:
  STDMETHOD(DeletePhoneRec)(/*[out]*/ BOOL *pOK);
  STDMETHOD(AddPhoneRec)(/*[in]*/ PhRec *pPhRec,
    /*[out]*/ BOOL *pOK);
   
  STDMETHOD(GetPhoneRec)(/*[in]*/ PhRec *pPhRec,
    /*[out]*/ BOOL *pOK);
    
  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);
protected:

  long m_currec;
  long m_numrecs;
  PhRec m_PhRecs[MAX_RECS];

};