This interface is used to send detailed messages from Litgen.dll about events that occurred during content preparation.
This is an outgoing interface. That is, a client of Litgen.dll should define a class that implements this interface, create an instance of that class, and pass a pointer to the instance to ILITWriter::SetCallback(). Litgen.dll will call Message() on that instance at various times.
If an error occurs during any method in Litgen, ILITCallback::Message() is the primary mechanism for describing the actual problem or suggesting a solution. Warnings may be generated about constructs that are valid, but may have undesirable results. Success messages are sent when a file is successfully completed. Message() will be called before the return of the method the event occurred in (and, in case of error, that method will return one of the generic HRESULTs listed the Return Values table in Interfaces.
Each message has a code as well as accompanying text. This code can be used to discriminate among messages, selecting some to be displayed to a user and others to be suppressed. It can also be used to recognize specific errors, in order to correct them automatically. Rather than simply being numbered sequentially, the message codes also distinguish the messages by class and severity. For more information on the encoding, as well as the complete list of messages, see Error Message List.
Though the message codes allow for simple suppression of warnings, suppressing them without giving the user a choice is strongly discouraged. It's best to use a conservative approach to suppressing messages; if the volume is too high to be useful in a particular application, use a Details>>-style fold-up dialog to show the warnings on demand.
In general, Litgen.dll has no contextual information to report in a message. For example, Litgen.dll can't know the current line number in the source document, since Litgen.dll isn't parsing the document. If there is useful context (such as a line number, or a hotlink) that can guide the user to the problem in the document, the client must fetch that information from its parser and present it along with Litgen's message.
Note: Litgen.dll understands line numbers in .css files, but nowhere else.
In addition to the methods inherited from IUnknown, the ILITCallback interface exposes the following methods.
Method | Description |
Message | Receives a warning, error, or informational error message. |
© 2000 Microsoft Corporation. All rights reserved. Terms of use.