WinCvtConvertToRtf

The WinCvtConvertToRtf function converts a file in an arbitary format into RTF.

WINCVT_STATUS
WinCvtConvertToRtf(
  LPCSTR szFileName, // Path of the file to convert (in native format.)
  LPCSTR szConverter,// Path to converter to use (optional.)
  LPCSTR szClass,    // The class of the conversion to use (optional.)
  HANDLE hOutput,    // Open stream to store RTF output.
  _WinCvtProgressCallback ProgressRoutine // Routine for progress notifications (optional.)
);

Parameters

szFileName
Path of the file to convert in native format.
szConverter
Path of the converter to use. If NULL, this is determined by looking up the class specified in the szClass parameter from the registry. If both szConverter and szClass are NULL, the converter is determined by interrogating all the system converters against the specified file. This can be obtained by calling the WinCvtGetClassFileName function.
szClass
Specifies the class of the converter to use. If szConverter is specified, this parameter is ignored. If this parameter is NULL, the converter is determined by interrogating all the system converters against the specified file. This can be obtained by calling the WinCvtGetClassName function.
hOutput
Specifies an output stream to store RTF data. This can be an opened file.
ProgressRoutine
Specifies the routine to receive progress notifications. If NULL, no progress notifications will be issued.

Return Values

If the function succeeds, the return value is WINCVT_SUCCESS. If the function fails, the return value is the error code describing the failure. This code can be turned into a human readable string using the WinCvtGetErrorString.

Remarks

The WinCvtConvertToRtf function converts a file in an arbitary format into RTF. For simplified conversion, use the WinCvtConvertFile function. To convert the RTF into another format, call the WinCvtConvertToNative function.

QuickInfo

WinCvt: Requires 0.1.0.
Header: Declared in WinCvt.h.
Import Library: Use WinCvt.lib.

See Also

WinCvtConvertFile, WinCvtConvertToNative, WinCvtGetClassFileName, WinCvtGetClassName, WinCvtGetErrorString, WinCvtProgressCallback.