Codex API: Shell


The SetGenericViewer function sets the file viewer application to be used for viewing/editing files inside archives during an archive view/update operation.


VOID SetGenericViewer(
    LPCTSTR lpViewer   // path to viewer application



[in] Pointer to a null-terminated string that specifies the full path of the default viewer/editor application to use.

Example: c:\windows\notepad.exe

Return Values

This function does not return any values.


The default file viewer is only used when a file inside an archive cannot be opened by any one of the registered applications on the system, meaning that it is an unrecognized file type.

Once set, the default file viewer will remain valid for the remainder of the Codex session. The Codex session ends when the Codex runtime is unloaded from memory, typically at application exit.


Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me:
Requires Windows 98 (or Windows 95 with DCOM 1.2).
Declared in mCodexAPI.h.
Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetGenericViewerEx