Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. mapiabobj.h
  5. Abstract:
  6. Class definition for CWabObj
  7. Environment:
  8. Fax send wizard
  9. Revision History:
  10. 10/23/97 -georgeje-
  11. Created it.
  12. mm/dd/yy -author-
  13. description
  14. --*/
  15. #ifndef __MAPIABOBJ_H_
  16. #define __MAPIABOBJ_H_
  17. #include "abobj.h"
  18. #define MAX_PROFILE_NAME (64)
  19. extern "C"
  20. {
  21. typedef HRESULT(STDAPICALLTYPE * LPHrQueryAllRows) (LPMAPITABLE lpTable,
  22. LPSPropTagArray lpPropTags,
  23. LPSRestriction lpRestriction,
  24. LPSSortOrderSet lpSortOrderSet,
  25. LONG crowsMax,
  26. LPSRowSet FAR *lppRows);
  27. }
  28. class CMAPIabObj : public CCommonAbObj{
  29. private:
  30. static HINSTANCE m_hInstMapi;
  31. static LPMAPISESSION m_lpMapiSession;
  32. static LPMAPILOGONEX m_lpfnMAPILogonEx;
  33. static LPMAPILOGOFF m_lpfnMAPILogoff;
  34. static LPMAPIADDRESS m_lpfnMAPIAddress;
  35. static LPMAPIFREEBUFFER m_lpfnMAPIFreeBuffer;
  36. static LPMAPIINITIALIZE m_lpfnMAPIInitialize;
  37. static LPMAPIUNINITIALIZE m_lpfnMAPIUninitialize;
  38. static LPMAPIALLOCATEBUFFER m_lpfnMAPIAllocateBuffer;
  39. static LPMAPIALLOCATEMORE m_lpfnMAPIAllocateMore;
  40. static LPMAPIADMINPROFILES m_lpfnMAPIAdminProfiles;
  41. static LPHrQueryAllRows m_lpfnHrQueryAllRows;
  42. static BOOL m_Initialized;
  43. IMsgStore * m_lpIMsgStore; // Used to keep a referent to the exchange store
  44. // to work around a bug in office 2000. The bug causes
  45. // store to be released by the address book when in offline mode.
  46. // overloaded virual functions
  47. virtual eABType GetABType() { return AB_MAPI; };
  48. HRESULT ABAllocateBuffer(ULONG cbSize,
  49. LPVOID FAR * lppBuffer);
  50. // internal implementation
  51. BOOL DoMapiLogon(HWND hDlg);
  52. BOOL InitMapiService(HWND hDlg);
  53. VOID DeinitMapiService(VOID);
  54. BOOL GetDefaultMapiProfile(LPSTR,UINT);
  55. VOID FreeProws(LPSRowSet prows);
  56. BOOL OpenExchangeStore();
  57. public:
  58. CMAPIabObj(HINSTANCE hInstance,HWND hDlg);
  59. ~CMAPIabObj();
  60. BOOL isInitialized() const { return m_Initialized; }
  61. ULONG ABFreeBuffer(LPVOID lpBuffer) ;
  62. } ;
  63. #endif