home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / convcwrp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  3.6 KB  |  105 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. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  11. #define _CONVCWRP_H
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. //$--HrConvInitGlobals-------------------------------------------------
  18. //
  19. // DESCRIPTION: Called once by the gateway to initalize common data areas.
  20. //
  21. // INPUT:   none
  22. //
  23. // RETURNS: HRESULT --  NOERROR if successfull,
  24. //                      E_NOTENOUGHMEMORY if memory problems
  25. //
  26. //---------------------------------------------------------------------
  27. HRESULT HrConvInitGlobals();
  28.  
  29. //$--ConvUninitGlobals-------------------------------------------------
  30. //
  31. // DESCRIPTION: Called once by the gateway to de-initalize common data areas.
  32. //
  33. // INPUT:   none
  34. //
  35. // RETURNS: VOID
  36. //
  37. //---------------------------------------------------------------------
  38. VOID ConvUninitGlobals();
  39.  
  40. //$--HrConvInitInstance-----------------------------------------------
  41. //
  42. //  DESCRIPTION: Called to create a new instance of the conversion engine.  Each
  43. //  instance of the conversion engine is single-threaded.  Multiple
  44. //  instances can be used in separate threads.
  45. //
  46. //  INPUT:   hEventSource   --  event source handle
  47. //
  48. //  OUTPUT:  ppvConvInst --  conversion engine instance
  49. //
  50. //  RETURNS:    HRESULT --  NOERROR if no error,
  51. //                          E_INVALIDARG if bad input,
  52. //                          E_FAIL if failure
  53. //
  54. //---------------------------------------------------------------------
  55. HRESULT HrConvInitInstance(      // RETURNS: HRESULT
  56.     IN HANDLE hEventSource,         // filled in with instance handle.
  57.     OUT PVOID * ppvConvInst);       // new conversion engine instance
  58.  
  59. //$--HrConvUninitInstance----------------------------------------------
  60. //
  61. // DESCRIPTION: Called to dispose of a previously allocated conversion engine.
  62. //
  63. // INPUT:   pvConvInst  --  conversion engine instance to free.
  64. //
  65. // RETURNS: HRESULT --  NOERROR if successful,
  66. //                      E_INVALIDARG if bad input
  67. //                      E_FAIL otherwise.
  68. //
  69. //---------------------------------------------------------------------
  70. HRESULT HrConvUninitInstance(     // RETURNS: HRESULT
  71.     IN PVOID pvConvInst);                    // handle to instance to free.
  72.  
  73. //$--HrConvConvert----------------------------------------------------
  74. //
  75. // DESCRIPTION: called to initiate a conversion.
  76. //
  77. // INPUT:   pvConvInst  --  conversion engine instance
  78. //          pEnv    --  conversion environment
  79. //          pszContentClass --  class of source
  80. //          pContentIn  --  source to be converted
  81. //          pContentOut --  converted object
  82. // 
  83. // OUTPUT:  
  84. //          pcrResult   --  result
  85. //
  86. // RETURNS: HRESULT --  NOERROR if no error,
  87. //                      E_INVALIDARG if bad input,
  88. //                      E_FAIL otherwise.
  89. //
  90. //---------------------------------------------------------------------
  91. HRESULT HrConvConvert(           // RETURNS: HRESULT
  92.     IN PVOID pvConvInst,            // handle to instance of engine.
  93.     IN PEDKCNVENV pEnv,             // environment of the convrsion
  94.     IN LPCWSTR pszContentClass,     // class of source to be converted.
  95.     IN PVOID pContentIn,            // source to be converted.
  96.     IN PVOID pContentOut,           // converted object
  97.     OUT EDKCNVRES *pcrResult);      // result.
  98.  
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102.  
  103. #pragma option pop /*P_O_Pop*/
  104. #endif
  105.