Registering a File Viewer

This section shows how to register a hypothetical file viewer for "AcmeWord Document" files with the .AWD filename extension. The file viewer is implemented in an in-process server DLL called ACMEWRDV.DLL. The DLL has this class identifier: 00021116-0000-0000-C000-000000000046. The program that installs the file viewer creates the following registry entries.

HKEY_CLASSES_ROOT

\QuickView

\.AWD = AcmeWord Document

\{00021117-0000-0000-C000-000000000046} = AcmeWord Document
Viewer

\CLSID

\{00021117-0000-0000-C000-000000000046} = AcmeWord Document
Viewer

\InprocServer32 = c:\acmeword\acmewrdv.dll

= ThreadingModel = "Apartment"

The .REG file, which is an ASCII text file, contains these entries. (Note that wrapped lines are indented on the second line.)

HKEY_CLASSES_ROOT\QuickView\.AWD = AcmeWord Document

HKEY_CLASSES_ROOT\QuickView\.AWD \{00021117-0000-0000-C000-
000000000046} = AcmeWord Document Viewer

HKEY_CLASSES_ROOT\CLSID\{00021117-0000-0000-C000-000000000046} =
AcmeWord Document Viewer

HKEY_CLASSES_ROOT\CLSID\{00021117-0000-0000-C000-000000000046}
\InprocServer32 = c:\acmeword\acmewrdv.dll

= ThreadingModel = "Apartment"

The Quick View program uses these registry entries to associate a path with the class identifier of a file viewer's in-process server DLL.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples