Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
CMsgStore Class Reference

#include <MapiApi.h>

List of all members.

Public Member Functions

 CMsgStore (ULONG cbEid=0, LPENTRYID lpEid=NULL)
 ~CMsgStore ()
void SetEntryID (ULONG cbEid, LPENTRYID lpEid)
BOOL Open (LPMAPISESSION pSession, LPMDB *ppMdb)
ULONG GetCBEntryID (void)
LPENTRYID GetLPEntryID (void)

Private Attributes

ULONG m_cbEid
BYTEm_lpEid
LPMDB m_lpMdb

Detailed Description

Definition at line 221 of file MapiApi.h.


Constructor & Destructor Documentation

CMsgStore::CMsgStore ( ULONG  cbEid = 0,
LPENTRYID  lpEid = NULL 
)

Definition at line 1677 of file MapiApi.cpp.

{
       m_lpEid = NULL;
       m_lpMdb = NULL;
       SetEntryID( cbEid, lpEid);
}

Here is the call graph for this function:

Definition at line 1684 of file MapiApi.cpp.

{
       if (m_lpEid)
              delete m_lpEid;

       if (m_lpMdb) {
              ULONG flags = LOGOFF_NO_WAIT;
              HRESULT hr = m_lpMdb->StoreLogoff( &flags);
              m_lpMdb->Release();
              m_lpMdb = NULL;
       }
}

Member Function Documentation

Definition at line 229 of file MapiApi.h.

{ return( m_cbEid);}

Here is the caller graph for this function:

LPENTRYID CMsgStore::GetLPEntryID ( void  ) [inline]

Definition at line 230 of file MapiApi.h.

{ return( (LPENTRYID) m_lpEid);}

Here is the caller graph for this function:

BOOL CMsgStore::Open ( LPMAPISESSION  pSession,
LPMDB *  ppMdb 
)

Definition at line 1719 of file MapiApi.cpp.

{
       if ( m_lpMdb) {
              if (ppMdb)
                     *ppMdb = m_lpMdb;
              return( TRUE);
       }

       BOOL bResult = TRUE;
       HRESULT hr = pSession->OpenMsgStore( NULL, m_cbEid, (LPENTRYID)m_lpEid, NULL, MDB_NO_MAIL, &m_lpMdb);    // MDB pointer
       if (HR_FAILED( hr)) {
              m_lpMdb = NULL;
              MAPI_TRACE2( "OpenMsgStore failed: 0x%lx, %d\n", (long)hr, (int)hr);
              bResult = FALSE;
       }

       if (ppMdb)
              *ppMdb = m_lpMdb;
       return( bResult);
}

Here is the caller graph for this function:

void CMsgStore::SetEntryID ( ULONG  cbEid,
LPENTRYID  lpEid 
)

Definition at line 1697 of file MapiApi.cpp.

{
       HRESULT              hr;

       if (m_lpEid)
              delete m_lpEid;

       m_lpEid = NULL;
       if (cbEid) {
              m_lpEid = new BYTE[cbEid];
              memcpy( m_lpEid, lpEid, cbEid);
       }
       m_cbEid = cbEid;

       if (m_lpMdb) {
              ULONG flags = LOGOFF_NO_WAIT;
              hr = m_lpMdb->StoreLogoff( &flags);
              m_lpMdb->Release();
              m_lpMdb = NULL;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 233 of file MapiApi.h.

Definition at line 234 of file MapiApi.h.

LPMDB CMsgStore::m_lpMdb [private]

Definition at line 235 of file MapiApi.h.


The documentation for this class was generated from the following files: