This callback function enables the calling application to specify an auxiliary output stream for a block or graphic.
BOOL (pascal *GetAuxOutput) ( void *pCallingContext, KVHTMLXMLAnchorTypeEx eAnchorTypeEx, char *pszAnchor, KVOutputStream *pNewOutput);
If the call is successful, the return value is TRUE
.
If the call is unsuccessful, the return value is FALSE
. Processing is halted.
If GetAuxOutput()
is NULL
, the pszDefaultOutputDirectory
member of the instance of KVHTMLOptionsEx
is used as the base storage location for auxiliary output files. If pszDefaultOutputDirectory
is also NULL
, auxiliary files are placed in the current working directory.
For each pszAnchor
provided, create (malloc
) an appropriate I/O structure. Assign pNewOutput->pOutputStreamPrivateData
to point to that structure. Each remaining member of the KVOutputStream
should then be initialized by assigning a function pointer to the additional application-defined functions, cast to the appropriate function prototype for Create()
, Write()
, Seek()
, Tell()
, and Close()
. Memory allocated to the I/O structure must be tracked and can be freed up within the call to Close()
. See the callback.c
sample program.
|