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

  1. // --convstrc.h-----------------------------------------------------------------
  2. //
  3. //  Defines common public conversion structures.
  4. // 
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  6. //
  7. // -----------------------------------------------------------------------------
  8.  
  9. #if !defined(_CONVSTRC_H)
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  11. #define _CONVSTRC_H
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. //$$--EDKCNVENV---------------------------------------------------------
  18. //
  19. //  DESCRIPTION: Structure that represents the environment of a conversion.
  20. //
  21. //---------------------------------------------------------------------
  22. typedef struct _EDKCNVENV
  23. {
  24.     INT nVersionEDKCNVENV ;
  25.     LPCWSTR pszConversionPoint ;
  26.  
  27.     // connection to MAPI system
  28.     LHANDLE lphSession ;
  29.     LPMDB lpMDB ;
  30.     LPADRBOOK lpAB ;
  31.     
  32.     // connection to foreign system
  33.     LPVOID pGatewayDefined ;
  34. } EDKCNVENV ;
  35.  
  36. typedef EDKCNVENV * PEDKCNVENV ;
  37.  
  38. //$$--EDKCNVRES---------------------------------------------------------
  39. //  Enumerated type indicating the result of a conversion.
  40. //---------------------------------------------------------------------
  41. typedef enum _EDKCNVRES
  42. {
  43.     GCR_OK = 0,
  44.     GCR_CANNOT_CONVERT,
  45.     GCR_CANNOT_LOAD,
  46.     GCR_NO_CANDIDATE,
  47.     GCR_CONVERSION_FAILED
  48. } EDKCNVRES ;
  49.  
  50.  
  51. //---------------------------------------------------------------------
  52. //  Types representing methods of a conversion DLL.
  53. //---------------------------------------------------------------------
  54.  
  55. typedef HRESULT (*PCONVDLLQUERY)(
  56.     IN LPCWSTR pszOptions,      // options pointer
  57.     IN LPCWSTR pszClass,        // class name pointer
  58.     IN PVOID pContent,          // object to convert pointer
  59.     IN PEDKCNVENV pEnv,         // environment pointer
  60.     OUT BOOL * pfAmCandidate);  // pointer to candidate status
  61.  
  62. typedef HRESULT (*PCONVDLLCONV)(
  63.     IN LPCWSTR pszOptions,      // options pointer
  64.     IN LPCWSTR pszClass,        // class name pointer
  65.     IN PVOID pContent,          // pointer to object to convert
  66.     IN PVOID pContentOut,       // pointer to converted object
  67.     IN PEDKCNVENV pEnv,         // environment pointer
  68.     OUT EDKCNVRES * pcr) ;      // pointer to conversion result
  69.  
  70. //$$--CONVDLLVECT-------------------------------------------------------
  71. //
  72. //  DESCRIPTION: Vector representing the entry points to a conversion.
  73. //
  74. //---------------------------------------------------------------------
  75. typedef struct _CONVDLLVECT
  76. {
  77.     short nVectorVersion ;
  78.     PCONVDLLQUERY pfnCnvQueryCapability ;
  79.     PCONVDLLCONV pfnCnvConvert ;
  80. } CONVDLLVECT ;
  81. typedef CONVDLLVECT * PCONVDLLVECT ;
  82.  
  83. typedef HRESULT (*PCONVDLLENTRYFN)(
  84.     IN DWORD,                   // version number desired
  85.     OUT PCONVDLLVECT FAR *) ;   // entry point function declaration
  86.  
  87. #define nDesiredConvDllVersion ((DWORD)1)           // current conversion vector version number.
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92.  
  93. #pragma option pop /*P_O_Pop*/
  94. #endif
  95.