Exception HRESULT: 0x80020008 (DISP_E_BADVARTYPE)

Symptoms

The exception can occur, for example, when you call a method or access property of an Image object obtained via ImageDocument::PreviewImage.

Cause

An open image contains this image plane, only if the IPrepareImageMode::CreatePreview property was set to TRUE during image preparation. Otherwise, the object accessed through this property is NULL.

Resolution

Set the IPrepareImageMode::CreatePreview property to TRUE. For example:

// C# code
FREngine.PrepareImageMode pim = engineLoader.Engine.CreatePrepareImageMode();
pim.CreatePreview = true;
document.AddImageFile( imagePath, pim, null );

FREngine.IHandle handle = document.Pages.Item(0).ImageDocument.PreviewImage.GetBitmap(null);

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.

Recently viewed