home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / edkmapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  51.1 KB  |  975 lines

  1. // --edkmapi.h------------------------------------------------------------------
  2. // 
  3. //  Header file for module containing MAPI utility functions.
  4. // 
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  6. // -----------------------------------------------------------------------------
  7. #ifndef _EDKMAPI_H
  8. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  9. #define _EDKMAPI_H
  10.  
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif // __cplusplus
  14.  
  15. // Flags for HrMAPIOpenCachedProp().
  16. #define EDK_CACHE_READ  0x00000001L
  17. #define EDK_CACHE_WRITE 0x00000002L
  18.  
  19. #define MODRECIP_EMPTY  (MODRECIP_ADD|MODRECIP_REMOVE)
  20.  
  21. /* Values of PR_NDR_REASON_CODE */
  22.  
  23. #define MAPI_REASON(_code)    ((LONG) _code)
  24.  
  25. #define MAPI_REASON_TRANSFER_FAILED           MAPI_REASON( 0 )
  26. #define MAPI_REASON_TRANSFER_IMPOSSIBLE       MAPI_REASON( 1 )
  27. #define MAPI_REASON_CONVERSION_NOT_PERFORMED  MAPI_REASON( 2 )
  28. #define MAPI_REASON_PHYSICAL_RENDITN_NOT_DONE MAPI_REASON( 3 )
  29. #define MAPI_REASON_PHYSICAL_DELIV_NOT_DONE   MAPI_REASON( 4 )
  30. #define MAPI_REASON_RESTRICTED_DELIVERY       MAPI_REASON( 5 )
  31. #define MAPI_REASON_DIRECTORY_OPERATN_FAILED  MAPI_REASON( 6 )
  32.  
  33. #define CbSPropValue(_centries) \
  34.     ((_centries)*sizeof(SPropValue))
  35.  
  36. #define CbNewADRENTRY(_centries) \
  37.     (offsetof(ADRENTRY,rgPropVals) + (_centries)*sizeof(LPSPropValue))
  38. #define CbADRENTRY(_lpadrentry) \
  39.     (offsetof(ADRENTRY,rgPropVals) + (UINT)(_lpadrentry)->cValues*sizeof(LPSPropValue))
  40.  
  41. #define VALID_RECIP_TYPE(ulRecipType) \
  42.     (((ulRecipType & (~MAPI_SUBMITTED)) == MAPI_ORIG) ||            \
  43.                 ((ulRecipType & (~MAPI_SUBMITTED)) == MAPI_TO) ||   \
  44.                 ((ulRecipType & (~MAPI_SUBMITTED)) == MAPI_CC) ||   \
  45.                 ((ulRecipType & (~MAPI_SUBMITTED)) == MAPI_BCC))
  46.  
  47. #define VALID_RELOP_T(x)  \
  48.     (((((ULONG)(x)) >= 0) && (((ULONG)(x)) < ((ULONG)RELOP_RE))) ? TRUE : FALSE)
  49.  
  50. #define VALID_ATTACH_METHOD(x)  \
  51.     (((((ULONG)(x)) >= ((ULONG)NO_ATTACHMENT)) && \
  52.     (((ULONG)(x)) < ((ULONG)ATTACH_OLE))) ? TRUE : FALSE)
  53.  
  54. //$--MSG_T----------------------------------------------------------------------
  55. //  Type of message.
  56. // -----------------------------------------------------------------------------
  57. typedef enum _msg
  58. {
  59.     MSG_ENVELOPE = 0,                   // message envelope
  60.     MSG_CONTENT,                        // message contents
  61.     MSG_LAST                            // all values are less than this
  62. } MSG_T;
  63.  
  64. #define VALID_MSG_T(x)  \
  65.     (((((ULONG)(x)) >= 0) && (((ULONG)(x)) < ((ULONG)MSG_LAST))) ? TRUE : FALSE)
  66.  
  67. //$--MD_ACTION_T----------------------------------------------------------------
  68. //  Type defining possible actions taken by an MD.
  69. // -----------------------------------------------------------------------------
  70. typedef enum _md_action
  71. {
  72.     MD_AC_EXPANDED = -2,                // Distribution list expanded
  73.     MD_AC_REDIRECTED,                   // Recipient address changed
  74.     MD_AC_RELAYED,                      // Normal action of a relay MTAE
  75.     MD_AC_REROUTED,                     // Previous attempt to route message
  76.     MD_AC_LAST                          // All values are less than this
  77. } MD_ACTION_T;
  78.  
  79. #define VALID_MD_ACTION(x)  \
  80.     ((((LONG)(x)) >= ((LONG)-2)) && (((LONG)(x)) < ((LONG)MD_AC_LAST)))
  81.  
  82. #define CbNewTRACEINFO(_centries) \
  83.     (offsetof(TRACEINFO,rgtraceentry) + (_centries)*sizeof(TRACEENTRY))
  84.  
  85. #define CbTRACEINFO(_lptraceinfo) \
  86.     (offsetof(TRACEINFO,rgtraceentry) + \
  87.     ((_lptraceinfo)->cEntries*sizeof(TRACEENTRY)))
  88.  
  89. #define CbNewINTTRACEINFO(_centries) \
  90.     (offsetof(INTTRACEINFO,rgIntTraceEntry) + (_centries)*sizeof(INTTRACEENTRY))
  91.  
  92. #define CbINTTRACEINFO(_lptraceinfo) \
  93.     (offsetof(INTTRACEINFO,rgIntTraceEntry) + \
  94.     ((_lptraceinfo)->cEntries*sizeof(INTTRACEENTRY)))
  95.  
  96. //******************************************************************************
  97. //
  98. // EDKMAPI.C function prototypes
  99. //
  100. //******************************************************************************
  101.  
  102. //$--HrMAPIGetFirstSRowSet------------------------------------------------------
  103. //  Gets the first SRowSet from a table
  104. // -----------------------------------------------------------------------------
  105. HRESULT HrMAPIGetFirstSRowSet(           // RETURNS: return code
  106.     IN LPMAPITABLE  lpTable,            // pointer to table address variable
  107.     IN ULONG cRows,                     // count of number of rows in SRowSet
  108.     IN LPSPropTagArray rgPropTags,      // array of property tags
  109.     OUT LPSRowSet FAR *lppRows);        // pointer to address variable for
  110.                                         // SRowSet
  111.  
  112. //$--HrMAPIGetNextSRowSet-------------------------------------------------------
  113. //  Gets the next SRowSet from a table
  114. // -----------------------------------------------------------------------------
  115. HRESULT HrMAPIGetNextSRowSet(            // RETURNS: return code
  116.     IN LPMAPITABLE lpTable,             // pointer to table
  117.     IN ULONG cRows,                     // count of number of rows in SRowSet
  118.     IN LPSPropTagArray rgPropTags,      // array of property tags
  119.     OUT LPSRowSet FAR *lppRows);        // pointer to address variable for
  120.                                         // SRowSet
  121.  
  122. //$--HrMAPICreateEntryList------------------------------------------------------
  123. //  Creates an ENTRYLIST. 
  124. // -----------------------------------------------------------------------------
  125. HRESULT HrMAPICreateEntryList(           // RETURNS: return code
  126.     IN ULONG cbeid,                     // count of bytes in Entry ID
  127.     IN LPENTRYID lpeid,                 // pointer to Entry ID
  128.     OUT LPENTRYLIST FAR *lppEntryList); // pointer to address variable of Entry
  129.                                         // list
  130.  
  131. //$--HrMAPIAppendEntryList------------------------------------------------------
  132. //  Appends to an ENTRYLIST.
  133. // -----------------------------------------------------------------------------
  134. HRESULT HrMAPIAppendEntryList(           // RETURNS: return code
  135.     IN ULONG cbeid,                     // count of bytes in Entry ID
  136.     IN LPENTRYID lpeid,                 // pointer to Entry ID
  137.     OUT LPENTRYLIST FAR lpEntryList);   // pointer to address variable of Entry
  138.                                         // list
  139.  
  140. //$--HrMAPIDestroyEntryList-----------------------------------------------------
  141. //  Frees an ENTRYLIST. 
  142. // -----------------------------------------------------------------------------
  143. HRESULT HrMAPIDestroyEntryList(               // RETURNS: return code
  144.     IN OUT LPENTRYLIST FAR *lppEntryList);// pointer to address variable of Entry
  145.                                           // list
  146.  
  147. //$--HrMAPIWriteStreamToFile----------------------------------------------------
  148. //  Write stream to a file given a file handle.
  149. // -----------------------------------------------------------------------------
  150. HRESULT HrMAPIWriteStreamToFile(        // RETURNS: return code
  151.     IN LPSTREAM lpStream,               // Pointer to stream
  152.     OUT HANDLE hFile);                  // Handle to file
  153.  
  154. //$--HrMAPIWriteFileToStream----------------------------------------------------
  155. //  Write file to a stream given a stream pointer.
  156. // -----------------------------------------------------------------------------
  157. HRESULT HrMAPIWriteFileToStream(        // RETURNS: return code
  158.     IN HANDLE hFile,                    // Handle to file
  159.     OUT LPSTREAM lpStream);             // Pointer to stream
  160.  
  161. //$--HrMAPIWriteAttachmentToFile------------------------------------------------
  162. //  Write the identified message attachment to a file.
  163. // -----------------------------------------------------------------------------
  164. HRESULT HrMAPIWriteAttachmentToFile(   // RETURNS: return code
  165.     IN LPMESSAGE pMessage,              // Message containing the attachments
  166.     IN ULONG iAttach,                   // Attachment identifier
  167.     OUT HANDLE  hFile);                 // Handle to file
  168.  
  169. //$--HrMAPIGotoSRow-------------------------------------------------------------
  170. //  Goto the specified SRow in an SRowSet.
  171. //------------------------------------------------------------------------------
  172. HRESULT HrMAPIGotoSRow(                  // RETURNS: return code
  173.     IN LPSRowSet FAR lpRows,            // pointer to SRowSet
  174.     IN ULONG ulRow,                     // index of SRow in SRowSet
  175.     OUT LPSRow *lppRow);                // pointer to SRow
  176.  
  177. //$--HrMAPIGotoFirstSRow--------------------------------------------------------
  178. //  Goto the first SRow in an SRowSet.
  179. //------------------------------------------------------------------------------
  180. HRESULT HrMAPIGotoFirstSRow(             // RETURNS: return code
  181.     IN LPSRowSet FAR lpRows,            // pointer to SRowSet
  182.     OUT ULONG *lpulRow,                 // index of SRow in SRowSet
  183.     OUT LPSRow *lppRow);                // pointer to SRow
  184.  
  185. //$--HrMAPIGotoNextSRow---------------------------------------------------------
  186. //  Goto the next SRow in an SRowSet.
  187. //------------------------------------------------------------------------------
  188. HRESULT HrMAPIGotoNextSRow(              // RETURNS: return code
  189.     IN LPSRowSet FAR lpRows,            // pointer to SRowSet
  190.     IN OUT ULONG *lpulRow,              // index of SRow in SRowSet
  191.     OUT LPSRow *lppRow);                // pointer to SRow
  192.  
  193. //$--HrMAPIWriteStreamToMemory--------------------------------------------------
  194. //  Reads a given number of bytes from a stream to a block of memory.
  195. // -----------------------------------------------------------------------------
  196. HRESULT HrMAPIWriteStreamToMemory(        // RETURNS: return code
  197.     IN LPSTREAM lpStream,               // pointer to stream
  198.     IN ULONG cBytes,                    // count of bytes in memory
  199.     IN LPBYTE lpbBytes,                 // pointer to memory
  200.     OUT ULONG *lpcBytesRead);           // count of bytes read from stream
  201.  
  202. //$--HrMAPIWriteMemoryToStream--------------------------------------------------
  203. //  Writes a given number of bytes from a block of memory to a stream
  204. // -----------------------------------------------------------------------------
  205. HRESULT HrMAPIWriteMemoryToStream(       // RETURNS: return code
  206.     IN LPSTREAM lpStream,               // pointer to stream
  207.     IN ULONG cBytes,                    // count of bytes in memory
  208.     IN LPBYTE lpbBytes,                 // pointer to memory
  209.     OUT ULONG *lpcBytesWritten);        // count of bytes written from stream
  210.  
  211. //$--HrMAPISetStreamSize--------------------------------------------------------
  212. //  Sets the size of the given stream.
  213. // -----------------------------------------------------------------------------
  214. HRESULT HrMAPISetStreamSize(             // RETURNS: return code
  215.     IN LPSTREAM lpStream,               // pointer to stream
  216.     IN ULONG cBytes);                   // count of bytes in stream
  217.  
  218. //******************************************************************************
  219. //
  220. // IADDRESS.C function prototypes
  221. //
  222. //******************************************************************************
  223.  
  224. //$--HrMAPICreateAddressList----------------------------------------------------
  225. //  Create an address list.
  226. // -----------------------------------------------------------------------------
  227. HRESULT HrMAPICreateAddressList(             // RETURNS: return code
  228.     IN ULONG cProps,                        // count of values in address list
  229.                                             // entry
  230.     IN LPSPropValue lpPropValues,           // pointer to address list entry
  231.     OUT LPADRLIST *lppAdrList);             // pointer to address list pointer
  232.  
  233. //$--HrMAPIAppendAddressList----------------------------------------------------
  234. //  Append to an address list.
  235. // -----------------------------------------------------------------------------
  236. HRESULT HrMAPIAppendAddressList(             // RETURNS: return code
  237.     IN ULONG cProps,                        // count of values in address list
  238.                                             // entry
  239.     IN LPSPropValue lpPropValues,           // pointer to address list entry
  240.     IN OUT LPADRLIST *lppAdrList);          // pointer to address list pointer
  241.  
  242. //$--HrMAPICreateSizedAddressList-----------------------------------------------
  243. //  Create a sized address list.
  244. // -----------------------------------------------------------------------------
  245. HRESULT HrMAPICreateSizedAddressList(        // RETURNS: return code
  246.     IN ULONG cEntries,                      // count of entries in address list
  247.     OUT LPADRLIST *lppAdrList);             // pointer to address list pointer
  248.  
  249. //$--HrMAPISetAddressList-------------------------------------------------------
  250. //  Set an address list.
  251. // -----------------------------------------------------------------------------
  252. HRESULT HrMAPISetAddressList(                // RETURNS: return code
  253.     IN ULONG iEntry,                        // index of address list entry
  254.     IN ULONG cProps,                        // count of values in address list
  255.                                             // entry
  256.     IN LPSPropValue lpPropValues,           // pointer to address list entry
  257.     IN OUT LPADRLIST lpAdrList);            // pointer to address list pointer
  258.  
  259. //******************************************************************************
  260. //
  261. // IFOLDER.C function prototypes
  262. //
  263. //******************************************************************************
  264.  
  265. //$--HrMAPIFindInbox------------------------------------------------------------
  266. //  Find IPM inbox folder.
  267. // -----------------------------------------------------------------------------
  268. HRESULT HrMAPIFindInbox(              // RETURNS: return code
  269.     IN LPMDB lpMdb,                     // pointer to message store
  270.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  271.     OUT LPENTRYID *lppeid);             // Entry ID of IPM inbox
  272.  
  273. //$--HrMAPIFindOutbox-----------------------------------------------------------
  274. //  Find IPM outbox folder.
  275. // -----------------------------------------------------------------------------
  276. HRESULT HrMAPIFindOutbox(             // RETURNS: return code
  277.     IN LPMDB lpMdb,                     // pointer to message store
  278.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  279.     OUT LPENTRYID *lppeid);             // Entry ID of IPM outbox
  280.  
  281. //$--HrMAPIFindIPMSubtree-------------------------------------------------------
  282. //  Find IPM subtree folder.
  283. // -----------------------------------------------------------------------------
  284. HRESULT HrMAPIFindIPMSubtree(            // RETURNS: return code
  285.     IN LPMDB lpMdb,                     // pointer to message store
  286.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  287.     OUT LPENTRYID *lppeid);             // entry ID of IPM subtree
  288.  
  289. //$--HrGWFindMtsOutFolder-------------------------------------------------------
  290. //  Find MTS-OUT folder.
  291. // -----------------------------------------------------------------------------
  292. HRESULT HrGWFindMtsOutFolder(                // RETURNS: return code
  293.     IN LPMDB lpMdb,                     // pointer to message store
  294.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  295.     OUT LPENTRYID *lppeid);             // entry ID of MTS-OUT
  296.  
  297. //$--HrGWFindMtsInFolder--------------------------------------------------------
  298. //  Find MTS-IN folder.
  299. // -----------------------------------------------------------------------------
  300. HRESULT HrGWFindMtsInFolder(                 // RETURNS: return code
  301.     IN LPMDB lpMdb,                     // pointer to message store
  302.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  303.     OUT LPENTRYID *lppeid);             // entry ID of MTS-IN
  304.  
  305. //$--HrFindExchangePublicStore--------------------------------------------------
  306. //  Find public store root folder.
  307. // -----------------------------------------------------------------------------
  308. HRESULT HrFindExchangePublicStore(           // RETURNS: return code
  309.     IN LPMDB lpMdb,                     // pointer to message store
  310.     OUT ULONG *lpcbeid,                 // count of bytes in entry ID
  311.     OUT LPENTRYID *lppeid);             // entry ID of public store
  312.  
  313. //$--HrMAPIFindFolder@----------------------------------------------------------
  314. //  Find a folder by name.
  315. // -----------------------------------------------------------------------------
  316. HRESULT HrMAPIFindFolderW(         // RETURNS: return code
  317.     IN LPMAPIFOLDER lpFolder,           // pointer to folder
  318.     IN LPCWSTR lpszName,                // name of folder to find
  319.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  320.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  321.  
  322. HRESULT HrMAPIFindFolderA(         // RETURNS: return code
  323.     IN LPMAPIFOLDER lpFolder,           // pointer to folder
  324.     IN LPCSTR lpszName,                 // name of folder to find
  325.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  326.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  327.  
  328. #ifdef UNICODE
  329. #define HrMAPIFindFolder   HrMAPIFindFolderW
  330. #else
  331. #define HrMAPIFindFolder   HrMAPIFindFolderA
  332. #endif
  333.  
  334. //$--HrMAPIFindSubfolderEx@-----------------------------------------------------
  335. //  Find a folder by name.
  336. // -----------------------------------------------------------------------------
  337. HRESULT HrMAPIFindSubfolderExW(
  338.     IN LPMAPIFOLDER lpRootFolder,       // open root folder
  339.     IN WCHAR chSep,                     // folder path separator
  340.     IN LPCWSTR lpszName,                // folder path
  341.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  342.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  343.  
  344. HRESULT HrMAPIFindSubfolderExA(
  345.     IN LPMAPIFOLDER lpFolder,           // open root folder
  346.     IN CHAR chSep,                      // folder path separator
  347.     IN LPCSTR lpszName,                 // folder path
  348.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  349.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  350.  
  351. #ifdef UNICODE
  352. #define HrMAPIFindSubfolderEx   HrMAPIFindSubfolderExW
  353. #else
  354. #define HrMAPIFindSubfolderEx   HrMAPIFindSubfolderExA
  355. #endif
  356.  
  357. //$--HrMAPIFindFolderEx@--------------------------------------------------------
  358. //  Finds an arbitrarily nested folder in the indicated store given its 
  359. //  path name.
  360. //------------------------------------------------------------------------------
  361. HRESULT HrMAPIFindFolderExW(
  362.     IN LPMDB lpMdb,                     // Open message store
  363.     IN WCHAR  chSep,                    // folder path separator character
  364.     IN LPCWSTR lpszFolderPath,          // folder path
  365.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  366.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  367.  
  368. HRESULT HrMAPIFindFolderExA(
  369.     IN LPMDB lpMdb,                     // Open message store
  370.     IN CHAR  chSep,                     // folder path separator character
  371.     IN LPCSTR lpszFolderPath,           // folder path
  372.     OUT ULONG *lpcbeid,                 // pointer to count of bytes in entry ID
  373.     OUT LPENTRYID *lppeid);             // pointer to entry ID pointer
  374.  
  375. #ifdef UNICODE
  376. #define HrMAPIFindFolderEx HrMAPIFindFolderExW
  377. #else
  378. #define HrMAPIFindFolderEx HrMAPIFindFolderExA
  379. #endif
  380.  
  381. //$--HrMAPIOpenFolderEx@--------------------------------------------------------
  382. //  Opens an arbitrarily nested folder in the indicated store given its 
  383. //  path name.
  384. //------------------------------------------------------------------------------
  385. HRESULT HrMAPIOpenFolderExW(
  386.     IN LPMDB lpMdb,                     // Open message store
  387.     IN WCHAR chSep,                     // folder path separator character
  388.     IN LPCWSTR lpszFolderPath,          // folder path
  389.     OUT LPMAPIFOLDER * lppFolder);      // pointer to folder opened
  390.  
  391. HRESULT HrMAPIOpenFolderExA(
  392.     IN LPMDB lpMdb,                     // Open message store
  393.     IN CHAR chSep,                      // folder path separator character
  394.     IN LPCSTR lpszFolderPath,           // folder path
  395.     OUT LPMAPIFOLDER * lppFolder);      // pointer to folder opened
  396.  
  397. #ifdef UNICODE
  398. #define HrMAPIOpenFolderEx HrMAPIOpenFolderExW
  399. #else
  400. #define HrMAPIOpenFolderEx HrMAPIOpenFolderExA
  401. #endif
  402.  
  403. //$--HrMAPIOpenSubfolderEx@-----------------------------------------------------
  404. //  Opens an arbitrarily nested folder in the indicated folder given its 
  405. //  path name.
  406. //------------------------------------------------------------------------------
  407. HRESULT HrMAPIOpenSubfolderExW(
  408.     IN LPMAPIFOLDER lpRootFolder,       // open root folder
  409.     IN WCHAR chSep,                     // folder path separator character
  410.     IN LPCWSTR lpszFolderPath,          // folder path
  411.     OUT LPMAPIFOLDER * lppFolder);      // pointer to folder opened
  412.  
  413. HRESULT HrMAPIOpenSubfolderExA(
  414.     IN LPMAPIFOLDER lpRootFolder,       // open root folder
  415.     IN CHAR chSep,                      // folder path separator character
  416.     IN LPCSTR lpszFolderPath,           // folder path
  417.     OUT LPMAPIFOLDER * lppFolder);      // pointer to folder opened
  418.  
  419. #ifdef UNICODE
  420. #define HrMAPIOpenSubfolderEx HrMAPIOpenSubfolderExW
  421. #else
  422. #define HrMAPIOpenSubfolderEx HrMAPIOpenSubfolderExA
  423. #endif
  424.  
  425. //$--HrOpenExchangePublicFolders------------------------------------------------
  426. //  Opens the root of the public folder hierarchy in the public message store.
  427. //------------------------------------------------------------------------------
  428. HRESULT HrOpenExchangePublicFolders(
  429.     IN LPMDB lpPubStore,
  430.     OUT LPMAPIFOLDER *lppRootFolder);
  431.  
  432. //******************************************************************************
  433. //
  434. // IMESSAGE.C function prototypes
  435. //
  436. //******************************************************************************
  437.  
  438. //$--HrMAPIFindMsgByProp--------------------------------------------------------
  439. //  Find the entry ID of a message given a property.
  440. // -----------------------------------------------------------------------------
  441. HRESULT HrMAPIFindMsgByProp(         // RETURNS: return code
  442.     IN LPMAPIFOLDER lpFolder,       // pointer to folder
  443.     IN LPSPropValue lpSPropValue,   // property value
  444.     OUT LPENTRYLIST *lppMsgList);   // list of matching messages
  445.  
  446. //$--HrMAPIMoveMessage----------------------------------------------------------
  447. //  Move one message from one folder to another.
  448. // -----------------------------------------------------------------------------
  449. HRESULT HrMAPIMoveMessage(            // RETURNS: return code
  450.     IN LPMAPIFOLDER lpSrcFolder,        // pointer to source folder
  451.     IN LPMAPIFOLDER lpDstFolder,        // pointer to destination folder
  452.     IN ULONG cbeid,                     // count of bytes in entry ID
  453.     IN LPENTRYID lpeid);                // pointer to entry ID
  454.  
  455. //$--HrMAPICopyMessage----------------------------------------------------------
  456. //  Copy one message from one folder to another.
  457. // -----------------------------------------------------------------------------
  458. HRESULT HrMAPICopyMessage(            // RETURNS: return code
  459.     IN LPMAPIFOLDER lpSrcFolder,        // pointer to source folder
  460.     IN LPMAPIFOLDER lpDstFolder,        // pointer to destination folder
  461.     IN ULONG cbeid,                     // count of bytes in entry ID
  462.     IN LPENTRYID lpeid);                // pointer to entry ID
  463.  
  464. //$--HrMAPIDeleteMessage--------------------------------------------------------
  465. //  Delete one message from one folder to another.
  466. // -----------------------------------------------------------------------------
  467. HRESULT HrMAPIDeleteMessage(          // RETURNS: return code
  468.     IN LPMAPIFOLDER lpFolder,           // pointer to folder
  469.     IN ULONG cbeid,                     // count of bytes in entry ID
  470.     IN LPENTRYID lpeid);                // pointer to entry ID
  471.  
  472. //******************************************************************************
  473. //
  474. // IPROP.C function prototypes
  475. //
  476. //******************************************************************************
  477.  
  478. //$--HrMAPIOpenCachedProp-------------------------------------------------------
  479. //
  480. //  DESCRIPTION: Create a new (local) IPropData object in which the original
  481. //  object properties are cached.  The local cached can be created for
  482. //  reading (for use with GetProp calls) for for writing (for use with
  483. //  SetProp calls).  The purpose of this function and HrMAPICloseCachedProp
  484. //  is to reduce the number of remote procedure calls made by code
  485. //  which performs many GetProp or SetProp calls on an object.
  486. //
  487. //  INPUT:  lpObj   --  property object to cache
  488. //          lpPropList  --  list of properties to cache (for reading)
  489. //                          defaults to all properties if NULL.
  490. //          ulFlags --  read OR write access flag (EDK_CACHE_READ
  491. //                      or EDK_CACHE_WRITE)
  492. //          
  493. //  OUTPUT: lppCachedObj    --  cached property object
  494. //
  495. //  RETURNS:    HRESULT --  NOERROR if successful,
  496. //                          E_INVALIDARG if bad input
  497. //                          E_FAIL otherwise.
  498. //
  499. //  NOTE:   This function creates a cached object for reading only
  500. //          or for writing only.  It does not support and object
  501. //          for both reading and writing.
  502. //
  503. // -----------------------------------------------------------------------------
  504. HRESULT HrMAPIOpenCachedProp(            // RETURNS: return code
  505.     IN LPMAPIPROP lpObj,                // source object
  506.     IN LPSPropTagArray lpPropList,      // list of properties to cache
  507.     IN ULONG ulFlags,                   // open for reading only or for writing only
  508.     OUT LPPROPDATA FAR * lppCachedObj); // cached version of source object
  509.  
  510. //$--HrMAPICloseCachedProp------------------------------------------------------
  511. //
  512. //  DESCRIPTION: If object was created as a write cache,
  513. //               copy properties in local cached object
  514. //               back to original remote object.
  515. //
  516. //  INPUT:  lpCachedObj --  cached property object
  517. //          lpOriginalObj   --  original property object
  518. //          ulFlags --  read cache or write cache flag (EDK_CACHE_READ
  519. //                      or EDK_CACHE_WRITE)
  520. //
  521. //  OUTPUT: lppProblems --  set to the property problem array returned
  522. //          by if there were problems setting properties on the original
  523. //          object
  524. //
  525. //  NOTES:  lppProblems:  It may be set, even though overall call
  526. //          is successful.  This is because all of the SetProps have been "deferred" on the
  527. //          original object until this call, the user will need to evaluate
  528. //          the contents of the lppProblems buffer pointer based on which
  529. //          properties he/or she actually tried to set.  
  530. //
  531. //  RETURNS:    HRESULT --  NOERROR if successful,
  532. //                          E_INVALIDARG if bad input
  533. //                          E_FAIL otherwise
  534. //
  535. //                          lppProblems will only be valid if return code
  536. //                          is NOERROR.
  537. //
  538. // -----------------------------------------------------------------------------
  539. HRESULT HrMAPICloseCachedProp(           // RETURNS: return code
  540.     IN LPPROPDATA lpCachedObj,          // cached property object
  541.     IN LPMAPIPROP lpOriginalObj,        // original object
  542.     IN ULONG ulFlags,                   // cache type (EDK_CACHE_READ or EDK_CACHE_WRITE)
  543.     OUT LPSPropProblemArray FAR * lppProblems); // pointer to property problems array if problems setting properties
  544.  
  545. //$--HrMAPIGetPropString--------------------------------------------------------
  546. //  Get a string property. 
  547. // -----------------------------------------------------------------------------
  548. HRESULT HrMAPIGetPropString(             // RETURNS: return code
  549.     IN LPMAPIPROP lpObj,                // pointer to object
  550.     IN ULONG ulPropTag,                 // property tag
  551.     OUT ULONG *lpcbProp,                // count of bytes in property
  552.     OUT LPVOID *lppvProp);              // pointer to property address variable
  553.  
  554. //$--HrMAPISetPropString--------------------------------------------------------
  555. //  Set a string property. 
  556. // -----------------------------------------------------------------------------
  557. HRESULT HrMAPISetPropString(             // RETURNS: return code
  558.     IN LPMAPIPROP lpObj,                // pointer to object
  559.     IN ULONG ulPropTag,                 // property tag
  560.     IN LPVOID lpvProp);                 // pointer to property
  561.  
  562. //$--HrMAPIGetPropBinary--------------------------------------------------------
  563. //  Get a binary property.
  564. // -----------------------------------------------------------------------------
  565. HRESULT HrMAPIGetPropBinary(             // RETURNS: return code
  566.     IN LPMAPIPROP lpObj,                // pointer to object
  567.     IN ULONG ulPropTag,                 // property tag
  568.     OUT ULONG *lpcbProp,                // count of bytes in property
  569.     OUT LPVOID *lppvProp);              // pointer to property address variable
  570.  
  571. //$--HrMAPISetPropBinary--------------------------------------------------------
  572. //  Set a binary property.
  573. // -----------------------------------------------------------------------------
  574. HRESULT HrMAPISetPropBinary(             // RETURNS: return code
  575.     IN LPMAPIPROP lpObj,                // pointer to object
  576.     IN ULONG ulPropTag,                 // property tag
  577.     IN ULONG cbProp,                    // count of bytes in property
  578.     IN LPVOID lpvProp);                 // pointer to property
  579.  
  580. //$--HrMAPIGetPropBoolean-------------------------------------------------------
  581. //  Get a boolean property.
  582. // -----------------------------------------------------------------------------
  583. HRESULT HrMAPIGetPropBoolean(            // RETURNS: return code
  584.     IN LPMAPIPROP lpObj,                // pointer to object
  585.     IN ULONG ulPropTag,                 // property tag
  586.     OUT BOOL *lpfProp);                 // pointer to property variable
  587.  
  588. //$--HrMAPISetPropBoolean-------------------------------------------------------
  589. //  Set a boolean property.
  590. // -----------------------------------------------------------------------------
  591. HRESULT HrMAPISetPropBoolean(            // RETURNS: return code
  592.     IN LPMAPIPROP lpObj,                // pointer to object
  593.     IN ULONG ulPropTag,                 // property tag
  594.     IN BOOL fProp);                     // property
  595.  
  596. //$--HrMAPIGetPropLong----------------------------------------------------------
  597. //  Get a long property.
  598. // -----------------------------------------------------------------------------
  599. HRESULT HrMAPIGetPropLong(               // RETURNS: return code
  600.     IN LPMAPIPROP lpObj,                // pointer to object
  601.     IN ULONG ulPropTag,                 // property tag
  602.     OUT ULONG *lpulProp);               // pointer to property variable
  603.  
  604. //$--HrMAPISetPropLong----------------------------------------------------------
  605. //  Set a long property.
  606. // -----------------------------------------------------------------------------
  607. HRESULT HrMAPISetPropLong(               // RETURNS: return code
  608.     IN LPMAPIPROP lpObj,                // pointer to object
  609.     IN ULONG ulPropTag,                 // property tag
  610.     IN ULONG ulProp);                   // property
  611.  
  612. //$--HrMAPIGetPropSystime-------------------------------------------------------
  613. //  Get a systime property.
  614. // -----------------------------------------------------------------------------
  615. HRESULT HrMAPIGetPropSystime(            // RETURNS: return code
  616.     IN LPMAPIPROP lpObj,                // pointer to object
  617.     IN ULONG ulPropTag,                 // property tag
  618.     OUT LPFILETIME lpSystime);          // pointer to property variable
  619.  
  620. //$--HrMAPISetPropSystime-------------------------------------------------------
  621. //  Set a systime property.
  622. // -----------------------------------------------------------------------------
  623. HRESULT HrMAPISetPropSystime(            // RETURNS: return code
  624.     IN LPMAPIPROP lpObj,                // pointer to object
  625.     IN ULONG ulPropTag,                 // property tag
  626.     IN LPFILETIME lpSystime);           // pointer to property
  627.  
  628. //$--HrMAPIGetPropToFile--------------------------------------------------------
  629. //  Get a property and put in a given file.
  630. // -----------------------------------------------------------------------------
  631. HRESULT HrMAPIGetPropToFile(             // RETURNS: return code
  632.     IN LPMAPIPROP lpObj,                // pointer to object
  633.     IN ULONG ulPropTag,                 // property tag
  634.     IN LPSTR lpszFilename,             // pointer to destination file name
  635.     OUT ULONG *lpcbProp);               // pointer to count of bytes address
  636.                                         // variable
  637.  
  638. //$--HrMAPISetPropFromFile------------------------------------------------------
  639. //  Set a property from a given file.
  640. // -----------------------------------------------------------------------------
  641. HRESULT HrMAPISetPropFromFile(          // RETURNS: return code
  642.     IN LPMAPIPROP lpObj,                // pointer to object
  643.     IN ULONG ulPropTag,                 // property tag
  644.     IN LPSTR lpszFilename,              // pointer to source file name
  645.     OUT ULONG *lpcbProp);               // pointer to count of bytes address
  646.                                         // variable
  647.  
  648. //$--HrMAPIOpenStreamOnProperty-------------------------------------------------
  649. //  Open a stream on a given property.
  650. // -----------------------------------------------------------------------------
  651. HRESULT HrMAPIOpenStreamOnProperty(     // RETURNS: return code
  652.     IN LPMAPIPROP lpObj,                // pointer to object
  653.     IN ULONG ulPropTag,                 // property tag
  654.     IN ULONG ulFlags,                   // flags (MAPI_CREATE and/or MAPI_MODIFY)
  655.     OUT LPSTREAM *lppStream);           // pointer to stream address variable
  656.  
  657. //$--HrMAPIAppendSPropValues----------------------------------------------------
  658. //  Append one set of SPropValue's to another.
  659. // -----------------------------------------------------------------------------
  660. HRESULT HrMAPIAppendSPropValues(        // RETURNS: return code
  661.     IN ULONG cHeadProps,                // count of property values in head
  662.     IN LPSPropValue lpHeadProps,        // pointer to property values in
  663.                                         // head
  664.     IN ULONG cTailProps,                // count of property values in tail
  665.     IN LPSPropValue lpTailProps,        // pointer to property values in
  666.                                         // tail
  667.     OUT ULONG *lpcNewProps,             // pointer to count of property
  668.                                         // values
  669.     OUT LPSPropValue *lppNewProps);     // pointer to property values 
  670.  
  671. //$--HrMAPIMoveOneProp----------------------------------------------------------
  672. //  Move one property from a source object to a destination object.
  673. // -----------------------------------------------------------------------------
  674. HRESULT HrMAPIMoveOneProp(               // RETURNS: return code
  675.     IN LPMAPIPROP lpSrcObj,             // pointer to source object
  676.     IN ULONG ulSrcPropTag,              // source property tag
  677.     IN ULONG ulDstPropTag,              // destination property tag
  678.     IN BOOL IsMust,                     // TRUE if a required property
  679.     IN BOOL IsReplace,                  // TRUE if existing destination
  680.                                         // property can be replaced
  681.     IN OUT LPMAPIPROP lpDstObj);        // pointer to destination object
  682.  
  683. //******************************************************************************
  684. //
  685. // ISTORE.C function prototypes
  686. //
  687. //******************************************************************************
  688.  
  689.  
  690. // $--HrMAPIFindStore-----------------------------------------------------------
  691. // Find an MDB store based on a string.
  692. //-----------------------------------------------------------------------------
  693. HRESULT HrMAPIFindStoreW(
  694.     IN    LPMAPISESSION    lpSession,  // MAPI session ptr
  695.     IN    LPCWSTR            lpszStore,  // store name
  696.     OUT    ULONG FAR *        lpcbentryid,// ptr to # bytes in entry ID
  697.     OUT    LPENTRYID FAR *    lppentryid);// ptr to entry ID buffer
  698.  
  699. HRESULT HrMAPIFindStoreA(
  700.     IN    LPMAPISESSION    lpSession,  // MAPI session ptr
  701.     IN    LPCSTR            lpszStore,  // store name
  702.     OUT    ULONG FAR *        lpcbentryid,// ptr to # bytes in entry ID
  703.     OUT    LPENTRYID FAR *    lppentryid);// ptr to entry ID buffer
  704.  
  705. #ifdef UNICODE
  706. #define HrMAPIFindStore  HrMAPIFindStoreW
  707. #else
  708. #define HrMAPIFindStore  HrMAPIFindStoreA
  709. #endif
  710.  
  711. //$--HrMAPIFindDefaultMsgStore--------------------------------------------------
  712. //  Get the entry ID of the default message store.
  713. // -----------------------------------------------------------------------------
  714. HRESULT HrMAPIFindDefaultMsgStore(    // RETURNS: return code
  715.     IN LPMAPISESSION lplhSession,   // session pointer
  716.     OUT ULONG *lpcbeid,             // count of bytes in entry ID
  717.     OUT LPENTRYID *lppeid);         // entry ID of default store
  718.  
  719. //$--FIsPublicStore-------------------------------------------------------------
  720. //  Returns TRUE if the MDB is a public store.
  721. // -----------------------------------------------------------------------------
  722. BOOL FIsPublicStore(
  723.     IN LPMDB lpmdb);                // pointer to message store
  724.  
  725. //$--_HrOpenStoreFromGuid-------------------------------------------------------
  726. //  Helper function to encapsulate the nuts and bolts of opening stores by GUID.
  727. //  Used by HrOpenExchangePublicStore(), and HrOpenExchangePrivateStore().
  728. //------------------------------------------------------------------------------
  729. HRESULT _HrOpenStoreFromGuid(
  730.     IN  LPMAPISESSION,
  731.     IN  LPGUID,
  732.     OUT LPMDB *);
  733.  
  734. //$--HrOpenExchangePublicStore--------------------------------------------------
  735. //  Locates the public store provider (first matching if there are multiple)
  736. //  and returns a pointer to it.
  737. //------------------------------------------------------------------------------
  738. __inline HRESULT HrOpenExchangePublicStore(
  739.     IN LPMAPISESSION lphSession,    // open session handle
  740.     OUT LPMDB * lppMDB)             // ptr to store opened
  741. {
  742.     return( _HrOpenStoreFromGuid( lphSession,
  743.         (LPGUID)pbExchangeProviderPublicGuid,
  744.         lppMDB));
  745. }
  746.  
  747. //$--HrOpenExchangePrivateStore--------------------------------------------------
  748. //  Locates the primary user store provider (first matching if there are multiple)
  749. //  and returns a pointer to it.
  750. //------------------------------------------------------------------------------
  751. __inline HRESULT HrOpenExchangePrivateStore(
  752.     IN LPMAPISESSION lphSession,    // open session handle
  753.     OUT LPMDB * lppMDB)             // ptr to store opened
  754. {
  755.     return( _HrOpenStoreFromGuid( lphSession,
  756.         (LPGUID)pbExchangeProviderPrimaryUserGuid,
  757.         lppMDB));
  758. }
  759.  
  760. //******************************************************************************
  761. //
  762. // ITRACE.C function prototypes
  763. //
  764. //******************************************************************************
  765.  
  766. //$--HrTraceGetEntryListSize----------------------------------------------------
  767. //  Get the size of the hop trace information in bytes.
  768. // -----------------------------------------------------------------------------
  769. HRESULT HrTraceGetEntryListSize(      // RETURNS: return code
  770.     IN LPTRACEINFO lpTraceInfo,         // Pointer to hop trace address variable
  771.     OUT ULONG      *lpcbTraceInfo);     // Count of bytes in hop trace list
  772.  
  773. //$--HrTraceGetEntryList--------------------------------------------------------
  774. //  Get the hop trace information for a given message.
  775. // -----------------------------------------------------------------------------
  776. HRESULT HrTraceGetEntryList(         // RETURNS: return code
  777.     IN LPMESSAGE   lpMessage,           // Pointer to message.
  778.     OUT LPTRACEINFO *lppTraceInfo);     // Pointer to hop trace address variable
  779.  
  780. //$--HrTraceSetEntryList--------------------------------------------------------
  781. //  Set the hop trace information for a given message.
  782. // -----------------------------------------------------------------------------
  783. HRESULT HrTraceSetEntryList(         // RETURNS: return code
  784.     IN LPMESSAGE   lpMessage,           // Pointer to message.
  785.     IN LPTRACEINFO lpTraceInfo);        // Pointer to hop trace address variable
  786.  
  787. //$--HrTraceCopyEntry-----------------------------------------------------------
  788. //  Copy trace entry information to a trace entry structure.
  789. // -----------------------------------------------------------------------------
  790. HRESULT HrTraceCopyEntry(            // RETURNS: return code
  791.     IN LONG     lAction,                // The routing action the tracing site
  792.                                         // took.
  793.     IN FILETIME ftArrivalTime,          // The time at which the communique
  794.                                         // entered the tracing site.
  795.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  796.                                         // released the message.
  797.     IN LPSTR    lpszADMDName,           // ADMD Name
  798.     IN LPSTR    lpszCountryName,        // Country Name
  799.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  800.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  801.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  802.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  803.     OUT LPTRACEENTRY lpTraceEntry);     // Pointer to trace entry address
  804.                                         // variable.
  805.  
  806. //$--HrTraceCreateEntryList-----------------------------------------------------
  807. //  Create a hop trace information list.
  808. // -----------------------------------------------------------------------------
  809. HRESULT HrTraceCreateEntryList(      // RETURNS: return code
  810.     IN LONG     lAction,                // The routing action the tracing site
  811.                                         // took.
  812.     IN FILETIME ftArrivalTime,          // The time at which the communique
  813.                                         // entered the tracing site.
  814.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  815.                                         // released the message.
  816.     IN LPSTR    lpszADMDName,           // ADMD Name
  817.     IN LPSTR    lpszCountryName,        // Country Name
  818.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  819.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  820.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  821.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  822.     OUT LPTRACEINFO *lppTraceInfo);     // Pointer to hop trace address variable
  823.  
  824. //$--HrTraceAppendEntryList-----------------------------------------------------
  825. //  Append to an existing hop trace information list.
  826. // -----------------------------------------------------------------------------
  827. HRESULT HrTraceAppendEntryList(      // RETURNS: return code
  828.     IN LONG     lAction,                // The routing action the tracing site
  829.                                         // took.
  830.     IN FILETIME ftArrivalTime,          // The time at which the communique
  831.                                         // entered the tracing site.
  832.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  833.                                         // released the message.
  834.     IN LPSTR    lpszADMDName,           // ADMD Name
  835.     IN LPSTR    lpszCountryName,        // Country Name
  836.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  837.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  838.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  839.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  840.     IN OUT LPTRACEINFO *lppTraceInfo);  // Pointer to hop trace address variable
  841.  
  842. //$--HrTraceGotoEntry-----------------------------------------------------------
  843. //  Goto the specified TRACEENTRY in a TRACEINFO
  844. // -----------------------------------------------------------------------------
  845. HRESULT HrTraceGotoEntry(            // RETURNS: return code
  846.     IN LPTRACEINFO lpTraceInfo,         // pointer to TRACEINFO
  847.     IN ULONG ulIndex,                   // index of TRACEENTRY in TRACEINFO
  848.     OUT LPTRACEENTRY *lppTraceEntry);   // pointer to TRACEENTRY
  849.  
  850. //$--HrTraceGotoFirstEntry------------------------------------------------------
  851. //  Goto the first TRACEENTRY in a TRACEINFO
  852. // -----------------------------------------------------------------------------
  853. HRESULT HrTraceGotoFirstEntry(       // RETURNS: return code
  854.     IN LPTRACEINFO lpTraceInfo,         // pointer to TRACEINFO
  855.     OUT ULONG *lpulIndex,               // index of TRACEENTRY in TRACEINFO
  856.     OUT LPTRACEENTRY *lppTraceEntry);   // pointer to TRACEENTRY
  857.  
  858. //$--HrTraceGotoNextEntry-------------------------------------------------------
  859. //  Goto the next TRACEENTRY in a TRACEINFO
  860. // -----------------------------------------------------------------------------
  861. HRESULT HrTraceGotoNextEntry(        // RETURNS: return code
  862.     IN LPTRACEINFO lpTraceInfo,         // pointer to TRACEINFO
  863.     IN OUT ULONG *lpulIndex,            // index of TRACEENTRY in TRACEINFO
  864.     OUT LPTRACEENTRY *lppTraceEntry);   // pointer to TRACEENTRY
  865.  
  866. //$--HrTraceOpenEntry-----------------------------------------------------------
  867. //  Open a TRACEENTRY.
  868. // -----------------------------------------------------------------------------
  869. HRESULT HrTraceOpenEntry(            // RETURNS: return code
  870.     IN LPTRACEENTRY lpTraceEntry,       // pointer to TRACEENTRY
  871.     OUT LONG     *plAction,             // The routing action the tracing site
  872.                                         // took.
  873.     OUT FILETIME *pftArrivalTime,       // The time at which the communique
  874.                                         // entered the tracing site.
  875.     OUT FILETIME *pftDeferredTime,      // The time are which the tracing site
  876.                                         // released the message.
  877.     OUT LPSTR    *lppszADMDName,        // ADMD Name
  878.     OUT LPSTR    *lppszCountryName,     // Country Name
  879.     OUT LPSTR    *lppszPRMDId,          // PRMD Identifier
  880.     OUT LPSTR    *lppszAttADMDName,     // Attempted ADMD Name
  881.     OUT LPSTR    *lppszAttCountryName,  // Attempted Country Name
  882.     OUT LPSTR    *lppszAttPRMDId);      // Attempted PRMD Identifier
  883.  
  884. //$--HrTraceSetInfo-------------------------------------------------------------
  885. //  Set the trace-info on a message.
  886. // -----------------------------------------------------------------------------
  887. HRESULT HrTraceSetInfo(              // RETURNS: return code
  888.     IN LONG lAction,                    // pointer to action
  889.     IN FILETIME *lpftArrivalTime,       // pointer to arrival time
  890.     IN FILETIME *lpftDeferredTime,      // pointer to deferred time
  891.     IN LPSTR lpszCountry,              // pointer to country
  892.     IN LPSTR lpszADMD,                 // pointer to ADMD
  893.     IN LPSTR lpszPRMD,                 // pointer to PRMD
  894.     IN OUT LPMESSAGE lpMessage);        // pointer to message
  895.  
  896. //$--HrTraceUpdateInfo----------------------------------------------------------
  897. //  Update the trace-info on a message.
  898. // -----------------------------------------------------------------------------
  899. HRESULT HrTraceUpdateInfo(              // RETURNS: return code
  900.     IN LONG lAction,                    // pointer to action
  901.     IN FILETIME *lpftArrivalTime,       // pointer to arrival time
  902.     IN FILETIME *lpftDeferredTime,      // pointer to deferred time
  903.     IN LPSTR lpszCountry,               // pointer to country
  904.     IN LPSTR lpszADMD,                  // pointer to ADMD
  905.     IN LPSTR lpszPRMD,                  // pointer to PRMD
  906.     IN OUT LPMESSAGE lpMessage);        // pointer to message
  907.  
  908. //$--HrInternalTraceCopyEntry---------------------------------------------------
  909. //  Copy internal trace entry information to an internal trace entry structure.
  910. // -----------------------------------------------------------------------------
  911. HRESULT HrInternalTraceCopyEntry(       // RETURNS: return code
  912.     IN LONG     lAction,                // The routing action the tracing site
  913.                                         // took.
  914.     IN FILETIME ftArrivalTime,          // The time at which the communique
  915.                                         // entered the tracing site.
  916.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  917.                                         // released the message.
  918.     IN LPSTR    lpszADMDName,           // ADMD Name
  919.     IN LPSTR    lpszCountryName,        // Country Name
  920.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  921.     IN LPSTR    lpszMTAName,            // MTA Name
  922.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  923.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  924.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  925.     IN LPSTR    lpszAttMTAName,         // Attempted MTA Name
  926.     OUT PINTTRACEENTRY lpTraceEntry);   // Pointer to trace entry address
  927.                                         // variable.
  928.  
  929. //$--HrInternalTraceCreateEntryList---------------------------------------------
  930. //  Create an internal hop trace information list.
  931. // -----------------------------------------------------------------------------
  932. HRESULT HrInternalTraceCreateEntryList( // RETURNS: return code
  933.     IN LONG     lAction,                // The routing action the tracing site
  934.                                         // took.
  935.     IN FILETIME ftArrivalTime,          // The time at which the communique
  936.                                         // entered the tracing site.
  937.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  938.                                         // released the message.
  939.     IN LPSTR    lpszADMDName,           // ADMD Name
  940.     IN LPSTR    lpszCountryName,        // Country Name
  941.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  942.     IN LPSTR    lpszMTAName,            // MTA Name
  943.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  944.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  945.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  946.     IN LPSTR    lpszAttMTAName,         // Attempted MTA Name
  947.     OUT PINTTRACEINFO *lppTraceInfo);   // Pointer to hop trace address variable
  948.  
  949. //$--HrInternalTraceAppendEntryList---------------------------------------------
  950. //  Append to an existing internal hop trace information list.
  951. // -----------------------------------------------------------------------------
  952. HRESULT HrInternalTraceAppendEntryList( // RETURNS: return code
  953.     IN LONG     lAction,                // The routing action the tracing site
  954.                                         // took.
  955.     IN FILETIME ftArrivalTime,          // The time at which the communique
  956.                                         // entered the tracing site.
  957.     IN FILETIME ftDeferredTime,         // The time are which the tracing site
  958.                                         // released the message.
  959.     IN LPSTR    lpszADMDName,           // ADMD Name
  960.     IN LPSTR    lpszCountryName,        // Country Name
  961.     IN LPSTR    lpszPRMDId,             // PRMD Identifier
  962.     IN LPSTR    lpszMTAName,            // MTA Name
  963.     IN LPSTR    lpszAttADMDName,        // Attempted ADMD Name
  964.     IN LPSTR    lpszAttCountryName,     // Attempted Country Name
  965.     IN LPSTR    lpszAttPRMDId,          // Attempted PRMD Identifier
  966.     IN LPSTR    lpszAttMTAName,         // Attempted MTA Name
  967.     IN OUT PINTTRACEINFO *lppTraceInfo);// Pointer to hop trace address variable
  968.  
  969. #ifdef __cplusplus
  970. }
  971. #endif // __cplusplus
  972.  
  973. #pragma option pop /*P_O_Pop*/
  974. #endif
  975.