Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsPreviewHandlerMBS class.

WindowsPreviewHandlerMBS.Constructor(ClassID as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Initializes the object with loading the class with the given classid.

You find those ClassIDs in the registry (See example project).

See HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers in the registry.

WindowsPreviewHandlerMBS.DoPreview

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Directs the preview handler to load data from the source specified in an earlier Initialize method call, and to begin rendering to the previewer window.

Lasterror is set.

If the previewer window has not yet been created, then it must be created after this method has been called. The preview handler is responsible for painting the area specified in SetWindow or SetRect. If these methods are called while the preview handler is rendering, the window must be reparented/resized without stopping or restarting the rendering of the item.
This method should be called only after SetWindow has been called.
Additionally, this method should be called only after Constructor has been called.

Some examples using this method:

WindowsPreviewHandlerMBS.InitWithData(data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Loads the given data.

Lasterror is set.
If loading from data is not supported for preview, we use a temporary file instead.

You need to call Preview next on success to show a preview.

See also:

WindowsPreviewHandlerMBS.InitWithData(data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Loads the given data.

Lasterror is set.
If loading from data is not supported for preview, we use a temporary file instead.

You need to call Preview next on success to show a preview.

See also:

WindowsPreviewHandlerMBS.InitWithFile(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Loads the given file.

Lasterror is set.
If the preview handler does not support reading file, the plugin reads the file and passes as data.

You need to call Preview next on success to show a preview.

If the file path is invalid, the preview will show a file not found error message.

WindowsPreviewHandlerMBS.Unload

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Directs the preview handler to cease rendering a preview and to release all resources that have been allocated based on the item passed in during the initialization.

Lasterror is set.
When called, the preview window will be destroyed.

This method should be called only after Constructor has been called. All resources associated with this initialization will be released. Prior to calling DoPreview, this preview handler will be re-initialized with a call to one of the initialization interfaces and a call to SetWindow.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...