home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / PROPTAG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.6 KB  |  83 lines

  1. //--proptag.h--------------------------------------------------------------------------
  2. //
  3. // Header file for the proptag library.
  4. //
  5. // Copyright (C) Microsoft Corp., 1986-1996.  All rights reserved.
  6. //
  7. //-----------------------------------------------------------------------------
  8.  
  9. #ifndef    _PROPTAG_H
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  11. #define _PROPTAG_H
  12.  
  13. #ifdef  __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. // $--HrGetPropTagName------------------------------------------------------------------------
  18. //
  19. // DESCRIPTION: Get a property tag name string ("PR_*") given a property tag
  20. //                value.
  21. //
  22. // INPUT:
  23. //
  24. //    [ulPropTag]        -- Property tag value.
  25. //
  26. // OUTPUT:
  27. //
  28. //    [lppszPropName]    -- Ptr to ptr which will be set to returned property tag
  29. //                       name string on success.
  30. //
  31. // RETURNS:     NOERROR on success; E_INVALIDARG if bad input,
  32. //              E_NOT_ENOUGH_MEMORY if memory problems.
  33. //                Note that if the value is not found in the property tag
  34. //                string table, then a string of the following form is returned:
  35. //                - For PT_STRING8,   "[S " <HexNumber> "]"
  36. //                - For PT_LONG,        "[N " <HexNumber> "]"
  37. //                - For all others,    "["   <HexNumber> "]"
  38. //
  39. // Notes:        When it is no longer needed, the user should free
  40. //                *lppszPropName using MAPIFREEBUFFER().
  41. //                To avoid setting up a second table, this function was
  42. //                implemented using linear search, so performance is not
  43. //                great in the current implementation.
  44. //---------------------------------------------------------------------------
  45.  
  46. HRESULT HrGetPropTagName(      // RETURNS: HRESULT
  47.     IN        ULONG        ulPropTag,      // property tag value
  48.     OUT        LPSTR FAR *    lppszPropName   // property tag name pointer
  49.     );
  50.  
  51. // $--HrGetPropTagValue------------------------------------------------------------------------
  52. //
  53. // DESCRIPTION: Get a property tag value given a property tag name
  54. //                string ("PR_*").
  55. //
  56. // INPUT:
  57. //
  58. //    [lpszPropName]    -- Ptr to property tag name string.
  59. //
  60. // OUTPUT:
  61. //
  62. //    [pulPropTag]    -- Ptr to ULONG which will be set to returned property
  63. //                       tag value on success;
  64. //
  65. // RETURNS:     NOERROR on success; MAPI_E_NOT_FOUND if not found,
  66. //              E_INVALIDARG if bad input.
  67. //
  68. // Notes:        We use binary search of a table, so performance for this
  69. //                function is pretty good.
  70. //---------------------------------------------------------------------------
  71.  
  72. HRESULT HrGetPropTagValue(      // RETURNS: HRESULT
  73.     IN        LPSTR        lpszPropName,   // property tag name
  74.     OUT        ULONG *        pulPropTag      // property tag
  75.     );
  76.  
  77. #ifdef  __cplusplus
  78. }       /*  extern "C" */
  79. #endif
  80.  
  81. #pragma option pop /*P_O_Pop*/
  82. #endif    // _PROPTAG_H
  83.