Reader Content SDK 1.5 Readme File
This SDK shows you how you can integrate Litgen.dll into your publishing application using Visual C++.
General Notes on Programming Style
- Non-registered .dll component. The Litgen.dll usage information is located in the descriptions in the
.idl, and the overall flow is described in the interface description of ILITWriter. The exceptions are noted
below.
- Sample code. There are two sample C++ projects included with the SDK:
- LitConvertDemo. Use this sample to learn how the Litgen.dll converts OEB package file to Microsoft
Reader (.lit) files.
- LitErrorDemo. Use this sample to learn how to generate and work with Litgen.dll messages,
including success, warning, and error messages.
- Note: Although Litgen.dll allows relative paths during implementation, paths to the package file must be
absolute in these sample projects.
How Litgen.dll is Implemented
The Litgen.dll implementation is mostly described in the .idl file, and the overall flow is described in
the interface description of ILITWriter.
Note the following exceptions:
- Although Litgen.dll is essentially a COM server, it is not created with the usual CoCreateInstance()
call or equivalent. Instead, Litgen.dll exposes a single entry point that you can use to get the ILITWriter
interface pointer. This approach avoids the usual sticky shared component issues (primarily installation
and reference counting, versioning, and interface compatibility).
- Use the ILITWriter interface pointer the way you would use it if it came from CoCreateInstance().
Since the library is loaded directly and the applications do not share, each application should install the
DLL alongside its own executables. No registration is required.
Note: Since Litgen.dll uses COM components internally, you must call CoInitialize before
ILITWriter::Create() even if you do not make any other calls to COM libraries.
In some situations, simply calling LoadLibrary(Litgen.dll) would be sufficient here. The extra work to
construct a full path is required for more complex situations, such as when Litgen.dll is incorporated into
a conventional COM inproc server. LoadLibrary() has a list of directories it searches for a named .dll. The
directory from which the application (the .exe itself) is loaded is included in this list, but the directory
from which some COM .dll was loaded is not. For these situations, you must tell LoadLibrary() where to
look.
Sample code is available in the Reader Content SDK 1.5 documentation.
Directories
- C++Demos: This directory contains two subdirectories with the demo projects. These are
LitConvertDemo and LitErrorDemo. For more information about using these demos, see the Developers Guide
documentation.
- Documentation: This directory contains the contentsdk.chm documentation for the Reader
Content SDK 1.5. The contentsdk.chm includes:
- The Developers Guide - Use this to learn how to incorporate the Litgen.dll into your
publishing tool.
- The Markup Guide - Use this to learn how to mark up files for successful conversion
to .lit format.
- LitGenComponent: This directory contains the Litgen.dll, the Litgen.idl, and the
Litgen_msgcodes.h files.
Source Content
Sample Reader source content and files. There are 4 sample Reader projects included with the SDK:
- The Legend of Sleepy Hollow sample. The files included are:
- irving_hollow.htm (content source file)
- losh.lit (Microsoft Reader file)
- losh.opf (OEB package file)
- losh090.jpeg (Pocket PC-compatible thumbnail image file)
- losh480.jpeg (Pocket PC-compatible cover image file)
- The goodarray sample. The files included are:
- goodarray.css (the cascading style sheet)
- goodarray.htm (the content source file)
- goodarray.opf (the OEB package file)
- SDKexample.lit (OEB version of tag samples. Also includes source files.)
- SDKexampleNOEB.lit (Non-OEB version of tag samples. Also includes source files.)
- The Reader Today magazine, called ReadersTODAY.lit.
Getting Help
The Reader Content SDK 1.5 is supported by Microsoft Product Support Services. For more information
about getting help with the Reader Content SDK 1.5, see the Microsoft Product Support Web site at
http://support.microsoft.com/directory/default.asp.