home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / convstrc.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  93 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. #define _CONVSTRC_H
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. //$$--EDKCNVENV---------------------------------------------------------
  17. //
  18. //  DESCRIPTION: Structure that represents the environment of a conversion.
  19. //
  20. //---------------------------------------------------------------------
  21. typedef struct _EDKCNVENV
  22. {
  23.     INT nVersionEDKCNVENV ;
  24.     LPCWSTR pszConversionPoint ;
  25.  
  26.     // connection to MAPI system
  27.     LHANDLE lphSession ;
  28.     LPMDB lpMDB ;
  29.     LPADRBOOK lpAB ;
  30.     
  31.     // connection to foreign system
  32.     LPVOID pGatewayDefined ;
  33. } EDKCNVENV ;
  34.  
  35. typedef EDKCNVENV * PEDKCNVENV ;
  36.  
  37. //$$--EDKCNVRES---------------------------------------------------------
  38. //  Enumerated type indicating the result of a conversion.
  39. //---------------------------------------------------------------------
  40. typedef enum _EDKCNVRES
  41. {
  42.     GCR_OK = 0,
  43.     GCR_CANNOT_CONVERT,
  44.     GCR_CANNOT_LOAD,
  45.     GCR_NO_CANDIDATE,
  46.     GCR_CONVERSION_FAILED
  47. } EDKCNVRES ;
  48.  
  49.  
  50. //---------------------------------------------------------------------
  51. //  Types representing methods of a conversion DLL.
  52. //---------------------------------------------------------------------
  53.  
  54. typedef HRESULT (*PCONVDLLQUERY)(
  55.     IN LPCWSTR pszOptions,      // options pointer
  56.     IN LPCWSTR pszClass,        // class name pointer
  57.     IN PVOID pContent,          // object to convert pointer
  58.     IN PEDKCNVENV pEnv,         // environment pointer
  59.     OUT BOOL * pfAmCandidate);  // pointer to candidate status
  60.  
  61. typedef HRESULT (*PCONVDLLCONV)(
  62.     IN LPCWSTR pszOptions,      // options pointer
  63.     IN LPCWSTR pszClass,        // class name pointer
  64.     IN PVOID pContent,          // pointer to object to convert
  65.     IN PVOID pContentOut,       // pointer to converted object
  66.     IN PEDKCNVENV pEnv,         // environment pointer
  67.     OUT EDKCNVRES * pcr) ;      // pointer to conversion result
  68.  
  69. //$$--CONVDLLVECT-------------------------------------------------------
  70. //
  71. //  DESCRIPTION: Vector representing the entry points to a conversion.
  72. //
  73. //---------------------------------------------------------------------
  74. typedef struct _CONVDLLVECT
  75. {
  76.     short nVectorVersion ;
  77.     PCONVDLLQUERY pfnCnvQueryCapability ;
  78.     PCONVDLLCONV pfnCnvConvert ;
  79. } CONVDLLVECT ;
  80. typedef CONVDLLVECT * PCONVDLLVECT ;
  81.  
  82. typedef HRESULT (*PCONVDLLENTRYFN)(
  83.     IN DWORD,                   // version number desired
  84.     OUT PCONVDLLVECT FAR *) ;   // entry point function declaration
  85.  
  86. #define nDesiredConvDllVersion ((DWORD)1)           // current conversion vector version number.
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif
  93.