WinCvt consists of tools, a library and documentation to convert files and build applications which convert applications on the Windows platform.
How converters work
A converter is a special DLL which exports known functions to perform conversion tasks. Conversion is based around the common format of RTF. A file is "imported" from its native format into RTF, and "exported" from RTF to its native format. A converter can implement import conversion, export conversion, or both. Each converter has a list of capabilities for the formats it is capable of importing and capable of exporting, stored in the converter file itself. In addition, once a converter is installed in the system, these capabilities are installed into a common location in the registry so that applications can utilise all known converters.
WinCvt implements all of these functions both in command line tools for users and administrators, as well as in a documented API which other applications can use. The mechanics of converters are abstracted by these functions.
Tools and Utilities
- The cvtfile.exe binary converts a file from one format to another.
- The cvtinst.exe binary installs a converter file into the registry ready for use by applications.
- The cvtopen.exe binary converts a file from its current format to RTF for modification, and converts back to its original format when modifications are complete.
- The cvtquery.exe binary queries the system registry for installed converters, or a converter for capabilities.
- The cvttype.exe binary queries the system registry for a converter capable of converting the specified document.
- The cvtver.exe binary displays the version of the WinCvt library in use and the version of WinCvt that it was compiled against.
- The cvtview.exe binary displays a document in any format for browsing.
- The cvtwiz.exe binary displays an easy to use UI for converting files from one format to another.
- The WINCVT_GET_MAJOR_VERSION macro retrieves the major version component from a version DWORD.
- The WINCVT_GET_MINOR_VERSION macro retrieves the minor version component from a version DWORD.
- The WINCVT_GET_MICRO_VERSION macro retrieves the micro version component from a version DWORD.
- The WinCvtAreVersionsCompatible function determines if an application linked with a specific version of headers can run with this library.
- The WinCvtHeaderVersion function returns the version of WinCvt that the running application was compiled against.
- The WinCvtIsLibraryCompatible function determines if the running application can run with this library.
- The WinCvtLibraryVersion function returns the version of the WinCvt library that the running application is currently using.
- The WinCvtConvertFile function converts a file from one format to another.
- The WinCvtConvertToNative function converts a stream of RTF into an arbitary, specified, format.
- The WinCvtConvertToRtf function converts a file in an arbitary format into RTF.
- The WinCvtProgressCallback function is called to notify an application on the progress of a call to WinCvtConvertToNative or WinCvtConvertToRtf.
Converter file functions
- The WinCvtGetConverterExportCapabilityList interrogates a particular converter file and obtains the list of export conversions it is capable of performing.
- The WinCvtGetConverterImportCapabilityList interrogates a particular converter file and obtains the list of import conversions it is capable of performing.
- The WinCvtInstallConverter function registers a converter (a .cvt file) into the registry suitable for applications to use.
- The WinCvtUninstallConverter function removes a converter (a .cvt file) from the registry suitable for removal from disk.
- The WinCvtGetExportConverterList function retrieves the list of converters that can convert from RTF to a native format.
- The WinCvtGetImportConverterList function retrieves the list of converters that can convert from native format to RTF.
- A well behaved application should call WinCvtFinalTeardown before terminating.
- The WinCvtFreeConverterList function is used to free all memory associated with a converter list obtained from other functions.
- The WinCvtGetClassDescription returns a string describing a particular conversion suitable for user display.
- The WinCvtGetClassExtensions function returns all of the extensions a class is capable of converting.
- The WinCvtGetClassFileName obtains the path to the converter used for this conversion class.
- The WinCvtGetClassName obtains the identifier of a class suitable for identifying the class to other functions.
- The WinCvtGetErrorString function translates a WINCVT_STATUS code into human-readable text.
- The WinCvtGetFirstClass function obtains the first conversion class from the specified list.
- The WinCvtGetNextClass obtains a subsequent item from a list.