home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / _entryid.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  111 lines

  1. /*
  2. ** --_entryid.h----------------------------------------------------------------
  3. **
  4. **  Header file describing internal structure of EntryIDs returned
  5. **  by Exchange Address Book provider.
  6. **
  7. **
  8. **  Copyright (c) Microsoft Corp. 1986-1996.  All Rights Reserved.
  9. **
  10. ** ----------------------------------------------------------------------------
  11. */
  12.  
  13. #ifndef _ENTRYID_
  14. #define _ENTRYID_
  15.  
  16. /*
  17.  *  The version of this ABPs entryids
  18.  */
  19. #define EMS_VERSION         0x000000001
  20.  
  21. /*
  22.  * The version of the entryids supported by the CreateEntry method in this 
  23.  * ABP.
  24.  */
  25. #define NEW_OBJ_EID_VERSION 0x00000002
  26.  
  27. /*
  28.  *  Valid values for the entry id's Type field are Mapi Display Types, plus:
  29.  */
  30. #define AB_DT_CONTAINER     0x000000100
  31. #define AB_DT_TEMPLATE      0x000000101
  32. #define AB_DT_OOUSER        0x000000102
  33. #define AB_DT_SEARCH        0x000000200
  34.  
  35. /*
  36.  *  The EMS ABPs MAPIUID
  37.  *
  38.  *  This MAPIUID must be unique (see the Service Provider Writer's Guide on
  39.  *  Constructing Entry IDs)
  40.  */
  41. #define MUIDEMSAB {0xDC, 0xA7, 0x40, 0xC8, 0xC0, 0x42, 0x10, 0x1A, \
  42.                0xB4, 0xB9, 0x08, 0x00, 0x2B, 0x2F, 0xE1, 0x82}
  43.  
  44. /*
  45.  *  Directory entry id structure
  46.  *
  47.  *  This entryid is permanent.
  48.  */
  49. #ifdef TEMPLATE_LCID
  50. typedef UNALIGNED struct _dir_entryid
  51. #else
  52. typedef struct _dir_entryid
  53. #endif
  54. {
  55.     BYTE abFlags[4];
  56.     MAPIUID muid;
  57.     ULONG ulVersion;
  58.     ULONG ulType;
  59. } DIR_ENTRYID, FAR * LPDIR_ENTRYID;
  60.  
  61. #define CBDIR_ENTRYID sizeof(DIR_ENTRYID)
  62.  
  63. /*
  64.  *  Mail user entry id structure
  65.  *
  66.  *  This entryid is ephemeral.
  67.  */
  68. #ifdef TEMPLATE_LCID
  69. typedef UNALIGNED struct _usr_entryid
  70. #else
  71. typedef struct _usr_entryid
  72. #endif
  73. {
  74.     BYTE abFlags[4];
  75.     MAPIUID muid;
  76.     ULONG ulVersion;
  77.     ULONG ulType;
  78.     DWORD dwEph;
  79. } USR_ENTRYID, FAR * LPUSR_ENTRYID;
  80.  
  81. /*
  82.  *  This entryid is permanent.
  83.  */
  84. /* turn off the warning for the unsized array */
  85. #pragma warning (disable:4200)
  86. #ifdef TEMPLATE_LCID
  87. typedef UNALIGNED struct _usr_permid
  88. #else
  89. typedef struct _usr_permid
  90. #endif
  91. {
  92.     BYTE abFlags[4];
  93.     MAPIUID muid;
  94.     ULONG ulVersion;
  95.     ULONG ulType;
  96.     char  szAddr[];
  97. } USR_PERMID, FAR * LPUSR_PERMID;
  98. #pragma warning (default:4200)
  99.  
  100. #define CBUSR_ENTRYID sizeof(USR_ENTRYID)
  101. #define CBUSR_PERMID sizeof(USR_PERMID)
  102.  
  103. #define EPHEMERAL   (UCHAR)(~(  MAPI_NOTRECIP      \
  104.                               | MAPI_THISSESSION   \
  105.                               | MAPI_NOW           \
  106.                               | MAPI_NOTRESERVED))
  107.  
  108.  
  109. #endif  /* _ENTRYID_ */
  110.  
  111.