home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / proptag.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  81 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. #define _PROPTAG_H
  11.  
  12. #ifdef  __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. // $--HrGetPropTagName------------------------------------------------------------------------
  17. //
  18. // DESCRIPTION: Get a property tag name string ("PR_*") given a property tag
  19. //                value.
  20. //
  21. // INPUT:
  22. //
  23. //    [ulPropTag]        -- Property tag value.
  24. //
  25. // OUTPUT:
  26. //
  27. //    [lppszPropName]    -- Ptr to ptr which will be set to returned property tag
  28. //                       name string on success.
  29. //
  30. // RETURNS:     NOERROR on success; E_INVALIDARG if bad input,
  31. //              E_NOT_ENOUGH_MEMORY if memory problems.
  32. //                Note that if the value is not found in the property tag
  33. //                string table, then a string of the following form is returned:
  34. //                - For PT_STRING8,   "[S " <HexNumber> "]"
  35. //                - For PT_LONG,        "[N " <HexNumber> "]"
  36. //                - For all others,    "["   <HexNumber> "]"
  37. //
  38. // Notes:        When it is no longer needed, the user should free
  39. //                *lppszPropName using MAPIFREEBUFFER().
  40. //                To avoid setting up a second table, this function was
  41. //                implemented using linear search, so performance is not
  42. //                great in the current implementation.
  43. //---------------------------------------------------------------------------
  44.  
  45. HRESULT HrGetPropTagName(      // RETURNS: HRESULT
  46.     IN        ULONG        ulPropTag,      // property tag value
  47.     OUT        LPSTR FAR *    lppszPropName   // property tag name pointer
  48.     );
  49.  
  50. // $--HrGetPropTagValue------------------------------------------------------------------------
  51. //
  52. // DESCRIPTION: Get a property tag value given a property tag name
  53. //                string ("PR_*").
  54. //
  55. // INPUT:
  56. //
  57. //    [lpszPropName]    -- Ptr to property tag name string.
  58. //
  59. // OUTPUT:
  60. //
  61. //    [pulPropTag]    -- Ptr to ULONG which will be set to returned property
  62. //                       tag value on success;
  63. //
  64. // RETURNS:     NOERROR on success; MAPI_E_NOT_FOUND if not found,
  65. //              E_INVALIDARG if bad input.
  66. //
  67. // Notes:        We use binary search of a table, so performance for this
  68. //                function is pretty good.
  69. //---------------------------------------------------------------------------
  70.  
  71. HRESULT HrGetPropTagValue(      // RETURNS: HRESULT
  72.     IN        LPSTR        lpszPropName,   // property tag name
  73.     OUT        ULONG *        pulPropTag      // property tag
  74.     );
  75.  
  76. #ifdef  __cplusplus
  77. }       /*  extern "C" */
  78. #endif
  79.  
  80. #endif    // _PROPTAG_H
  81.