using System; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; namespace Vanara.PInvoke { public static partial class Shell32 { /// /// Provides methods that enable you to set or retrieve a DataPackage object's IDataObject interface, which the DataPackage uses to /// support interoperability. The DataPackage object is used by an app to provide data to another app. /// /// /// When to implement /// Do not implement this interface. An implementation is provided as part of the DataPackage object. /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-idataobjectprovider [PInvokeData("shobjidl_core.h", MSDNShortId = "NN:shobjidl_core.IDataObjectProvider")] [ComImport, Guid("3D25F6D6-4B2A-433c-9184-7C33AD35D001"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IDataObjectProvider { /// Gets an IDataObject representation of the current DataPackage object. /// /// Type: IDataObject** /// /// The address of an IDataObject interface pointer that, when this method returns successfully, points to the /// IDataObject representation of the DataPackage object. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-idataobjectprovider-getdataobject HRESULT // GetDataObject( IDataObject **dataObject ); IDataObject GetDataObject(); /// Wraps an IDataObject instance as a Windows Runtime DataPackage. /// An IDataObject interface pointer to the data object from which to build the DataPackage object. // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-idataobjectprovider-setdataobject HRESULT // SetDataObject( IDataObject *dataObject ); void SetDataObject([In] IDataObject dataObject); } } }