using System.Runtime.InteropServices.ComTypes; namespace Vanara.PInvoke; public static partial class Shell32 { /// /// Exposes a method for retrieving the thumbnail handler of an item. Implement this interface if you want to specify what extractor /// is used for a child IDList. /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ithumbnailhandlerfactory [ComImport, Guid("e35b4b2e-00da-4bc1-9f13-38bc11f5d417"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IThumbnailHandlerFactory { /// Gets the requested thumbnail handler for the thumbnail of a given item. /// /// Type: PCUITEMID_CHILD /// The item within the namespace for which the thumbnail handler is being retrieved. /// /// /// Type: IBindCtx* /// A pointer to an IBindCtx to be used during the moniker binding operation of this process. /// /// /// Type: REFIID /// A reference to the IID of the interface requested. This is usually IThumbnailProvider or IExtractImage. /// /// /// Type: void** /// /// When this method returns, contains the address of a pointer to the requested thumbnail handler. If this method fails, this /// value is NULL. /// /// /// /// Type: HRESULT /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. /// /// Windows Vista calls the IThumbnailHandlerFactory::GetThumbnailHandler method before falling back on GetUIObjectOf. // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ithumbnailhandlerfactory-getthumbnailhandler // HRESULT GetThumbnailHandler( PCUITEMID_CHILD pidlChild, IBindCtx *pbc, REFIID riid, void **ppv ); [PreserveSig] HRESULT GetThumbnailHandler([In] PIDL pidlChild, IBindCtx pbc, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 2)] out object? ppv); } }