MAPINIT.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:3k
源码类别:

Windows编程

开发平台:

Visual C++

  1. #define SZ_MAPILOGON "MAPILogon"
  2. #define SZ_MAPILOGOFF "MAPILogoff"
  3. #define SZ_MAPISENDMAIL "MAPISendMail"
  4. #define SZ_MAPISENDDOC "MAPISendDocuments"
  5. #define SZ_MAPIFINDNEXT "MAPIFindNext"
  6. #define SZ_MAPIREADMAIL "MAPIReadMail"
  7. #define SZ_MAPISAVEMAIL "MAPISaveMail"
  8. #define SZ_MAPIDELMAIL "MAPIDeleteMail"
  9. #define SZ_MAPIFREEBUFFER "MAPIFreeBuffer"
  10. #define SZ_MAPIADDRESS "MAPIAddress"
  11. #define SZ_MAPIDETAILS "MAPIDetails"
  12. #define SZ_MAPIRESOLVENAME "MAPIResolveName"
  13. #define MAPIDLL "MAPI32.DLL"
  14. #define ERR_LOAD_LIB  0x02
  15. #define ERR_LOAD_FUNC 0x04
  16. typedef ULONG (FAR PASCAL *PFNMAPILOGON)(HWND, LPSTR, LPSTR, FLAGS, ULONG, LPLHANDLE);
  17. typedef ULONG (FAR PASCAL *PFNMAPILOGOFF)(LHANDLE, HWND, FLAGS,ULONG);
  18. typedef ULONG (FAR PASCAL *PFNMAPISENDMAIL)(LHANDLE, HWND, lpMapiMessage, FLAGS,
  19.                                      ULONG);
  20. typedef ULONG (FAR PASCAL *PFNMAPISENDDOCUMENTS)(HWND, LPSTR, LPSTR, LPSTR, ULONG);
  21. typedef ULONG (FAR PASCAL *PFNMAPIFINDNEXT)(LHANDLE, HWND, LPSTR, LPSTR, FLAGS,
  22.                                      ULONG, LPSTR);
  23. typedef ULONG (FAR PASCAL *PFNMAPIREADMAIL)(LHANDLE, HWND, LPSTR, FLAGS, ULONG,
  24.                                      lpMapiMessage FAR *);
  25. typedef ULONG (FAR PASCAL *PFNMAPISAVEMAIL)(LHANDLE, HWND, lpMapiMessage, FLAGS,
  26.                                      ULONG, LPSTR);
  27. typedef ULONG (FAR PASCAL *PFNMAPIDELETEMAIL)(LHANDLE, HWND, LPSTR, FLAGS, ULONG);
  28. typedef ULONG (FAR PASCAL *PFNMAPIFREEBUFFER)(LPVOID);
  29. typedef ULONG (FAR PASCAL *PFNMAPIADDRESS)(LHANDLE, HWND, LPSTR, ULONG, LPSTR,
  30.                 ULONG, lpMapiRecipDesc, FLAGS, ULONG,
  31.                                     LPULONG, lpMapiRecipDesc FAR *);
  32. typedef ULONG (FAR PASCAL *PFNMAPIDETAILS)(LHANDLE, HWND,lpMapiRecipDesc, FLAGS,
  33.                                     ULONG);
  34. typedef ULONG (FAR PASCAL *PFNMAPIRESOLVENAME)(LHANDLE, HWND, LPSTR, FLAGS,
  35.                 ULONG, lpMapiRecipDesc FAR *);
  36. #ifdef MAIN
  37. PFNMAPILOGON lpfnMAPILogon;
  38. PFNMAPILOGOFF lpfnMAPILogoff;
  39. PFNMAPISENDMAIL lpfnMAPISendMail;
  40. PFNMAPISENDDOCUMENTS lpfnMAPISendDocuments;
  41. PFNMAPIFINDNEXT lpfnMAPIFindNext;
  42. PFNMAPIREADMAIL lpfnMAPIReadMail;
  43. PFNMAPISAVEMAIL lpfnMAPISaveMail;
  44. PFNMAPIDELETEMAIL lpfnMAPIDeleteMail;
  45. PFNMAPIFREEBUFFER lpfnMAPIFreeBuffer;
  46. PFNMAPIADDRESS lpfnMAPIAddress;
  47. PFNMAPIDETAILS lpfnMAPIDetails;
  48. PFNMAPIRESOLVENAME lpfnMAPIResolveName;
  49. #else
  50. extern PFNMAPILOGON lpfnMAPILogon;
  51. extern PFNMAPILOGOFF lpfnMAPILogoff;
  52. extern PFNMAPISENDMAIL lpfnMAPISendMail;
  53. extern PFNMAPISENDDOCUMENTS lpfnMAPISendDocuments;
  54. extern PFNMAPIFINDNEXT lpfnMAPIFindNext;
  55. extern PFNMAPIREADMAIL lpfnMAPIReadMail;
  56. extern PFNMAPISAVEMAIL lpfnMAPISaveMail;
  57. extern PFNMAPIDELETEMAIL lpfnMAPIDeleteMail;
  58. extern PFNMAPIFREEBUFFER lpfnMAPIFreeBuffer;
  59. extern PFNMAPIADDRESS lpfnMAPIAddress;
  60. extern PFNMAPIDETAILS lpfnMAPIDetails;
  61. extern PFNMAPIRESOLVENAME lpfnMAPIResolveName;
  62. #endif
  63. int FAR PASCAL InitMAPI(void);
  64. int FAR PASCAL DeInitMAPI(void);