using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class Shell32
{
/// IID of Windows.ApplicationModel.DataTransfer.DataTransferManager to be used by .
public static readonly Guid IID_DataTransferManager = new(0xa5caee9b, 0x8708, 0x49d1, 0x8d, 0x36, 0x67, 0xd2, 0x5a, 0x8d, 0xa0, 0x0c);
/// Enables access to DataTransferManager methods in a Windows Store app that manages multiple windows.
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-idatatransfermanagerinterop
[PInvokeData("shobjidl_core.h", MSDNShortId = "NN:shobjidl_core.IDataTransferManagerInterop")]
[ComImport, Guid("3A3DCD6C-3EAB-43DC-BCDE-45671CE800C8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IDataTransferManagerInterop
{
/// Gets the DataTransferManager instance for the specified window.
/// The window whose DataTransferManager instance is to be retrieved.
/// The requested interface ID of the DataTransferManager instance.
/// Receives the DataTransferManager instance.
/// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
///
/// This method is equivalent to the DataTransferManager.GetForCurrentView method, except that you specify a window from a
/// multi-window Windows Store app.
///
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-idatatransfermanagerinterop-getforwindow
// HRESULT GetForWindow( HWND appWindow, REFIID riid, void **dataTransferManager );
[PreserveSig]
HRESULT GetForWindow(HWND appWindow, in Guid riid, out IntPtr dataTransferManager);
/// Displays the UI for sharing content for the specified window.
/// The window to show the share UI for.
/// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
///
/// This method is equivalent to the DataTransferManager.ShowShareUI method, except that you specify a window from a
/// multi-window Windows Store app.
///
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-idatatransfermanagerinterop-showshareuiforwindow
// HRESULT ShowShareUIForWindow( HWND appWindow );
[PreserveSig]
HRESULT ShowShareUIForWindow(HWND appWindow);
}
}
}