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