- Introduction
- Developer’s Guide
- Samples
- Reference
Item content
The content of an item is used in general when the end-user double-clicks on an item. If the item’s type (or extension) is known to the system and associated to an application, the content is requested by ShellBoost to the ShellItem instance using the GetContent() method. The method signature is defined like this:
public virtual ShellContent GetContent()
The ShellContent is a stream-oriented abstract class that provides enough information for the ShellBoost components to provide the content to whatever Windows component that’s requesting it. ShellBoost also provides two non-abstract classes to make things easier:
FileShellContent: uses a physical file as the content.
MemoryShellContent: uses memory as the content. Memory can be represented by a string, an array of bytes, or a seekable and readable Stream.
Note: if the ShellItem instance represents a physical file item, the default implementation of GetContent() will return an instance of the FileShellContent, initialized with the corresponding physical file, so the method does not need to be overridden in that case.