fpFilterStream()
This function filters text from an input stream to an output buffer.
Syntax
KVErrorCode pascal fpFilterStream( void *pContext, void *pStreamContext KVFilterOutput *pFilterOutput, KVSummaryInfoEx *pSummaryInfo);
Arguments
pContext
|
A pointer returned from fpInit() or fpInitWithLicenseData(). |
pStreamContext
|
A pointer returned from fpOpenStream() or fpOpenStreamEx2(). |
pFilterOutput
|
A pointer to the KVFilterOutput structure. This structure defines the output buffer. |
pSummaryInfo
|
This argument is reserved. It must be NULL . |
Returns
The return value is an error code. See KVErrorCode.
Discussion
-
This function processes data in chunks. To return the entire output stream, you must call this function repeatedly until the entire output buffer is processed, that is, until the following condition occurs:
pFilterOutput-> cbText == 0
- This function runs in process or out of process. See The Filter Process Model.
- After each call to
fpFilterStream
, once the data in thepFilterOutput
argument is no longer required, call fpFreeFilterOutput to free the memory allocated by this function. - When filtering out-of-process in streaming mode (see Stream Data to Filter), you must finish filtering the stream before using any interface function other than
fpFilterStream()
or fpCloseStream() with the same context pointer. Filtering can be completed at any time by calling fpCloseStream() or by callingfpFilterStream()
untilpFilterOutput->cbText == 0
.
Example
error = (int)(*pFilterInterface->fpFilterStream)( pFilter, pStream, &filterOut, NULL );