home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / convcwrp.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  4KB  |  103 lines

  1. // --convcwrp.h-----------------------------------------------------------------
  2. // 
  3. //  C callable code that wraps the conversion engine class.
  4. //
  5. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  6. //
  7. // -----------------------------------------------------------------------------
  8.  
  9. #if !defined(_CONVCWRP_H)
  10. #define _CONVCWRP_H
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. //$--HrConvInitGlobals-------------------------------------------------
  17. //
  18. // DESCRIPTION: Called once by the gateway to initalize common data areas.
  19. //
  20. // INPUT:   none
  21. //
  22. // RETURNS: HRESULT --  NOERROR if successfull,
  23. //                      E_NOTENOUGHMEMORY if memory problems
  24. //
  25. //---------------------------------------------------------------------
  26. HRESULT HrConvInitGlobals();
  27.  
  28. //$--ConvUninitGlobals-------------------------------------------------
  29. //
  30. // DESCRIPTION: Called once by the gateway to de-initalize common data areas.
  31. //
  32. // INPUT:   none
  33. //
  34. // RETURNS: VOID
  35. //
  36. //---------------------------------------------------------------------
  37. VOID ConvUninitGlobals();
  38.  
  39. //$--HrConvInitInstance-----------------------------------------------
  40. //
  41. //  DESCRIPTION: Called to create a new instance of the conversion engine.  Each
  42. //  instance of the conversion engine is single-threaded.  Multiple
  43. //  instances can be used in separate threads.
  44. //
  45. //  INPUT:   hEventSource   --  event source handle
  46. //
  47. //  OUTPUT:  ppvConvInst --  conversion engine instance
  48. //
  49. //  RETURNS:    HRESULT --  NOERROR if no error,
  50. //                          E_INVALIDARG if bad input,
  51. //                          E_FAIL if failure
  52. //
  53. //---------------------------------------------------------------------
  54. HRESULT HrConvInitInstance(      // RETURNS: HRESULT
  55.     IN HANDLE hEventSource,         // filled in with instance handle.
  56.     OUT PVOID * ppvConvInst);       // new conversion engine instance
  57.  
  58. //$--HrConvUninitInstance----------------------------------------------
  59. //
  60. // DESCRIPTION: Called to dispose of a previously allocated conversion engine.
  61. //
  62. // INPUT:   pvConvInst  --  conversion engine instance to free.
  63. //
  64. // RETURNS: HRESULT --  NOERROR if successful,
  65. //                      E_INVALIDARG if bad input
  66. //                      E_FAIL otherwise.
  67. //
  68. //---------------------------------------------------------------------
  69. HRESULT HrConvUninitInstance(     // RETURNS: HRESULT
  70.     IN PVOID pvConvInst);                    // handle to instance to free.
  71.  
  72. //$--HrConvConvert----------------------------------------------------
  73. //
  74. // DESCRIPTION: called to initiate a conversion.
  75. //
  76. // INPUT:   pvConvInst  --  conversion engine instance
  77. //          pEnv    --  conversion environment
  78. //          pszContentClass --  class of source
  79. //          pContentIn  --  source to be converted
  80. //          pContentOut --  converted object
  81. // 
  82. // OUTPUT:  
  83. //          pcrResult   --  result
  84. //
  85. // RETURNS: HRESULT --  NOERROR if no error,
  86. //                      E_INVALIDARG if bad input,
  87. //                      E_FAIL otherwise.
  88. //
  89. //---------------------------------------------------------------------
  90. HRESULT HrConvConvert(           // RETURNS: HRESULT
  91.     IN PVOID pvConvInst,            // handle to instance of engine.
  92.     IN PEDKCNVENV pEnv,             // environment of the convrsion
  93.     IN LPCWSTR pszContentClass,     // class of source to be converted.
  94.     IN PVOID pContentIn,            // source to be converted.
  95.     IN PVOID pContentOut,           // converted object
  96.     OUT EDKCNVRES *pcrResult);      // result.
  97.  
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101.  
  102. #endif
  103.