WinCvtConvertFile

The WinCvtConvertFile function converts a file from one format to another.

WINCVT_STATUS
WinCvtConvertFile(
  LPCSTR szSourceFile, // The path of the file to convert in original format.
  LPCSTR szSourceClass,// The class of converter to convert from (optional.)
  LPCSTR szDestFile,   // The path of the new file to create.
  LPCSTR szDestClass,  // The class of converter to convert to (optional.)
  _WinCvtProgressCallback ProgressRoutine // Routine for progress notifications (optional.)
);

Parameters

szSourceFile
The path of the file to convert in original format.
szSourceClass
The class of converter to convert from. If not specified, the appropriate class is determined by interrogating converters to find one which can convert the file specified in szSourceFile. The class name can be obtained from WinCvtGetClassName.
szDestFile
The path of the new file to create. If szDestClass is NULL, this parameter may also be NULL; in this case, RTF is outputted to standard output. If szDestClass is specified, this parameter may not be NULL.
szDestClass
The class of the converter to convert to. If NULL, the output is in RTF. The class name can be obtained from WinCvtGetClassName.
ProgressRoutine
Specifies the routine to receive progress notifications. If NULL, no progress notifications will be issued. This may only be specified on WinCvt 0.3.1 or newer; on older builds, it must be NULL.

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 WinCvtConvertFile function converts a file from one format to another. For finer-grained control, use the WinCvtConvertToRtf and WinCvtConvertToNative functions.

QuickInfo

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

See Also

WinCvtConvertToNative, WinCvtConvertToRtf, WinCvtGetClassName, WinCvtGetErrorString, WinCvtProgressCallback.