![]() |
TECFlushMultipleEncodings |
||||
Header: | TextEncodingConverter.h | Carbon status: | Supported | |
Flushes out any encodings that may be stored in a converter objects temporary buffers and shifts encodings back to their default state, if any.
OSStatus TECFlushMultipleEncodings ( TECObjectRef encodingConverter, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount *actualOutputLength, TextEncodingRun outEncodingsBuffer[], ItemCount maxOutEncodingRuns, ItemCount *actualOutEncodingRuns );
The reference to the text encoding converter object whose contents are to be flushed. This is the reference returned by the function TECCreateOneToManyConverter.
On return, a pointer to a buffer that holds the converted text. An error is returned is the buffer is not large enough to hold the entire converted text stream.
The length in bytes of the outputBuffer parameter.
On return, a pointer to a the actual number of bytes of the converted text returned in the outputBuffer parameter.
An ordered array of text encoding runs for the destination text encoding. Note that the actual byte size of this buffer should be actualOutEncodingRuns * sizeof(TextEncodingRun).
The maximum number of encoding runs that can fit in outEncodingsBuffer[].
On return, a pointer to a the number of runs in the buffer during conversion.
A result code.
You should always call TECFlushMultipleEncodings at the end of the conversion process to flush out any data that may be stored in the temporary buffers of the text encoding converter object or to perform other end-of-encoding conversion tasks. Encodings such as ISO-2022-JP are reset to a default state when you use this function.
For the function to return successfully, the output buffer you allocate must be large enough to accommodate the converted text. If the output buffer is too small to accommodate any converted text, the function will fail. For best results, you should follow these guidelines when you allocate an output buffer:
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)