Open topic with navigation
This function analyzes the source document and determines whether the detected file format requires the custom reader. It is called only when the
[CustomFilters] section of the
formats.ini file contains an entry identifying the complete file name of the custom reader. For more information on the
formats.ini file, see File Format Detection.
Bool pascal _export xxxsrAutoDet( adTPDocInfo *pTPDocInfo, KPTPIOobj *pIO)
||A pointer to the
||A pointer to the I/O stream object for the document processed.|
TRUEif the file format matches that of the custom reader.
FALSEif the file format does not match that of the custom reader.
Typically, only the first 1 KB of the file is read into a buffer and analyzed to determine if it matches the file format of the custom reader. If a match is determined, the following four members of the
adTPDocInfo structure must be assigned before returning
||Must be set to
||A numerical value assigned to this reader in the
||A string describing the file format.|
||The initial part of the custom reader file name with the "
TRUE, the custom reader is used to parse the file and generate the token stream.
FALSE, all other readers in the
[CustomFilters]section of the
formats.inifile are tried. If no match is found, the file detection process continues checking for the formats supported by Filter SDK.
[Formats]section of the
formats.inifile should be of the form
aaais the value used for the
bbbis the value of the file class,
cccis the value of the minor format, and
dddis the value of the major version.