Skip to content

There is something wrong with the type definition of IThumbnailProvider for COM interop purposes #579

@catmanjan

Description

@catmanjan

I was trying to use IThumbnailProvider like this other person was: dahall/WinClassicSamplesCS#6

I found a similar problem where my cloud provider sync root was triggering the Initialize function (from my IInitializeWithItem implemention) but not GetThumbnail.

I then tried writing my own interface like so:

    [ComVisible(true), Guid("e357fccd-a995-4576-b01f-234630154e96"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IThumbnailProvider
    {
        HRESULT GetThumbnail(int cx, out IntPtr hBitmap, out WTS_ALPHATYPE bitmapType);
    }

And it just worked, so I think maybe there is something wrong with the Vanara version.

Could it be the type of hBitmap is not casting correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions