File: Windows.Win32.IDataObject.g.cs
Project: src\src\System.Private.Windows.Core\src\System.Private.Windows.Core.csproj (System.Private.Windows.Core)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
	namespace System.Com
	{
		[Guid("0000010E-0000-0000-C000-000000000046")]
		[SupportedOSPlatform("windows5.0")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IDataObject
			:IVTable<IDataObject,IDataObject.Vtbl>,IComIID		{
			/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
			internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
			{
				fixed (void** ppvObjectLocal = &ppvObject)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal);
						return __result;
					}
				}
			}

			public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IDataObject*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

			public uint AddRef()
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,uint>)lpVtbl[1])((IDataObject*)Unsafe.AsPointer(ref this));
			}

			public uint Release()
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,uint>)lpVtbl[2])((IDataObject*)Unsafe.AsPointer(ref this));
			}

			/// <inheritdoc cref="GetData(winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.STGMEDIUM*)"/>
			internal unsafe winmdroot.Foundation.HRESULT GetData(in winmdroot.System.Com.FORMATETC pformatetcIn, out winmdroot.System.Com.STGMEDIUM pmedium)
			{
				fixed (winmdroot.System.Com.STGMEDIUM* pmediumLocal = &pmedium)
				{
					fixed (winmdroot.System.Com.FORMATETC* pformatetcInLocal = &pformatetcIn)
					{
						winmdroot.Foundation.HRESULT __result = this.GetData(pformatetcInLocal, pmediumLocal);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetData(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatetcIn, winmdroot.System.Com.STGMEDIUM* pmedium)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetData(pformatetcIn, pmedium);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Called by a data consumer to obtain data from a source data object.</summary>
			/// <param name="pformatetcIn">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure that defines the format, medium, and target device to use when passing the data. It is possible to specify more than one medium by using the Boolean OR operator, allowing the method to choose the best medium among those specified.</param>
			/// <param name="pmedium">A pointer to the <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure that indicates the storage medium containing the returned data through its tymed member, and the responsibility for releasing the medium through the value of its <b>pUnkForRelease</b> member. If <b>pUnkForRelease</b> is <b>NULL</b>, the receiver of the medium is responsible for releasing it; otherwise, <b>pUnkForRelease</b> points to the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a> on the appropriate object so its <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">Release</a> method can be called. The medium must be allocated and filled in by <b>GetData</b>.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>A data consumer calls <b>GetData</b> to retrieve data from a data object, conveyed through a storage medium (defined through the <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure). <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> You can specify more than one acceptable <b>tymed</b> medium with the Boolean OR operator. <b>GetData</b> must choose from the OR'd values the medium that best represents the data, do the allocation, and indicate responsibility for releasing the medium. Data transferred across a stream extends from position zero of the stream pointer through to the position immediately before the current stream pointer (that is, the stream pointer position upon exit). <h3><a id="Notes_to_Implementers"></a><a id="notes_to_implementers"></a><a id="NOTES_TO_IMPLEMENTERS"></a>Notes to Implementers</h3> <b>GetData</b> must check all fields in the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure. It is important that <b>GetData</b> render the requested aspect and, if possible, use the requested medium. If the data object cannot comply with the information specified in the <b>FORMATETC</b>, the method should return DV_E_FORMATETC. If an attempt to allocate the medium fails, the method should return STG_E_MEDIUMFULL. It is important to fill in all of the fields in the <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure. Although the caller can specify more than one medium for returning the data, <b>GetData</b> can provide only one medium. If the initial transfer fails with the selected medium, this method can be implemented to try one of the other media specified before returning an error.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-getdata#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT GetData(winmdroot.System.Com.FORMATETC* pformatetcIn, winmdroot.System.Com.STGMEDIUM* pmedium)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IDataObject*)Unsafe.AsPointer(ref this), pformatetcIn, pmedium);
			}

			/// <inheritdoc cref="GetDataHere(winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.STGMEDIUM*)"/>
			internal unsafe winmdroot.Foundation.HRESULT GetDataHere(in winmdroot.System.Com.FORMATETC pformatetc, ref winmdroot.System.Com.STGMEDIUM pmedium)
			{
				fixed (winmdroot.System.Com.STGMEDIUM* pmediumLocal = &pmedium)
				{
					fixed (winmdroot.System.Com.FORMATETC* pformatetcLocal = &pformatetc)
					{
						winmdroot.Foundation.HRESULT __result = this.GetDataHere(pformatetcLocal, pmediumLocal);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetDataHere(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetDataHere(pformatetc, pmedium);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Called by a data consumer to obtain data from a source data object. This method differs from the GetData method in that the caller must allocate and free the specified storage medium.</summary>
			/// <param name="pformatetc">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure that defines the format, medium, and target device to use when passing the data. Only one medium can be specified in <b>tymed</b>, and only the following values are valid: TYMED_ISTORAGE, TYMED_ISTREAM, TYMED_HGLOBAL, or TYMED_FILE.</param>
			/// <param name="pmedium">A pointer to the <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure that defines the storage medium containing the data being transferred. The medium must be allocated by the caller and filled in by <b>GetDataHere</b>. The caller must also free the medium. The implementation of this method must always supply a value of <b>NULL</b> for the <b>punkForRelease</b> member of the <b>STGMEDIUM</b> structure to which this parameter points.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>The <b>GetDataHere</b> method is similar to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a>, except that the caller must both allocate and free the medium specified in <i>pmedium</i>. <b>GetDataHere</b> renders the data described in a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure and copies the data into that caller-provided <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure. For example, if the medium is TYMED_HGLOBAL, this method cannot resize the medium or allocate a new hGlobal. Some media are not appropriate in a call to <b>GetDataHere</b>, including GDI types such as metafiles. The <b>GetDataHere</b> method cannot put data into a caller-provided metafile. In general, the only storage media it is necessary to support in this method are TYMED_ISTORAGE, TYMED_ISTREAM, and TYMED_FILE. When the transfer medium is a stream, OLE makes assumptions about where the data is being returned and the position of the stream's seek pointer. In a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">GetData</a> call, the data returned is from stream position zero through just before the current seek pointer of the stream (that is, the position on exit). For <b>GetDataHere</b>, the data returned is from the stream position on entry through just before the position on exit.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-getdatahere#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT GetDataHere(winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IDataObject*)Unsafe.AsPointer(ref this), pformatetc, pmedium);
			}

			/// <inheritdoc cref="QueryGetData(winmdroot.System.Com.FORMATETC*)"/>
			internal unsafe winmdroot.Foundation.HRESULT QueryGetData(in winmdroot.System.Com.FORMATETC pformatetc)
			{
				fixed (winmdroot.System.Com.FORMATETC* pformatetcLocal = &pformatetc)
				{
					winmdroot.Foundation.HRESULT __result = this.QueryGetData(pformatetcLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT QueryGetData(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatetc)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.QueryGetData(pformatetc);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Determines whether the data object is capable of rendering the data as specified. Objects attempting a paste or drop operation can call this method before calling IDataObject::GetData to get an indication of whether the operation may be successful.</summary>
			/// <param name="pformatetc">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure defining the format, medium, and target device to use for the query.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>The client of a data object calls <b>QueryGetData</b> to determine whether passing the specified <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure to a subsequent call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a> is likely to be successful. A successful return from this method does not necessarily ensure the success of the subsequent paste or drop operation.</remarks>
			public unsafe winmdroot.Foundation.HRESULT QueryGetData(winmdroot.System.Com.FORMATETC* pformatetc)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IDataObject*)Unsafe.AsPointer(ref this), pformatetc);
			}

			/// <inheritdoc cref="GetCanonicalFormatEtc(winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.FORMATETC*)"/>
			internal unsafe winmdroot.Foundation.HRESULT GetCanonicalFormatEtc(in winmdroot.System.Com.FORMATETC pformatectIn, out winmdroot.System.Com.FORMATETC pformatetcOut)
			{
				fixed (winmdroot.System.Com.FORMATETC* pformatetcOutLocal = &pformatetcOut)
				{
					fixed (winmdroot.System.Com.FORMATETC* pformatectInLocal = &pformatectIn)
					{
						winmdroot.Foundation.HRESULT __result = this.GetCanonicalFormatEtc(pformatectInLocal, pformatetcOutLocal);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetCanonicalFormatEtc(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatectIn, winmdroot.System.Com.FORMATETC* pformatetcOut)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetCanonicalFormatEtc(pformatectIn, pformatetcOut);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Provides a potentially different but logically equivalent FORMATETC structure. You use this method to determine whether two different FORMATETC structures would return the same data, removing the need for duplicate rendering.</summary>
			/// <param name="pformatectIn">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure that defines the format, medium, and target device that the caller would like to use to retrieve data in a subsequent call such as <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a>. The <b>tymed</b> member is not significant in this case and should be ignored.</param>
			/// <param name="pformatetcOut">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure that contains the most general information possible for a specific rendering, making it canonically equivalent to <i>pformatetcIn</i>. The caller must allocate this structure and the <b>GetCanonicalFormatEtc</b> method must fill in the data. To retrieve data in a subsequent call like <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a>, the caller uses the specified value of <i>pformatetcOut</i>, unless the value specified is <b>NULL</b>. This value is <b>NULL</b> if the method returns DATA_S_SAMEFORMATETC. The <b>tymed</b> member is not significant in this case and should be ignored.</param>
			/// <returns>
			/// <para>This method can return the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>If a data object can supply exactly the same data for more than one requested <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure, <b>GetCanonicalFormatEtc</b> can supply a "canonical", or standard <b>FORMATETC</b> that gives the same rendering as a set of more complicated <b>FORMATETC</b> structures. For example, it is common for the data returned to be insensitive to the target device specified in any one of a set of otherwise similar <b>FORMATETC</b> structures. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> A call to this method can determine whether two calls to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a> on a data object, specifying two different <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structures, would actually produce the same renderings, thus eliminating the need for the second call and improving performance. If the call to <b>GetCanonicalFormatEtc</b> results in a canonical format being written to the <i>pformatetcOut</i> parameter, the caller then uses that structure in a subsequent call to <b>IDataObject::GetData</b>. <h3><a id="Notes_to_Implementers"></a><a id="notes_to_implementers"></a><a id="NOTES_TO_IMPLEMENTERS"></a>Notes to Implementers</h3> Conceptually, it is possible to think of <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structures in groups defined by a canonical <b>FORMATETC</b> that provides the same results as each of the group members. In constructing the canonical <b>FORMATETC</b>, you should make sure it contains the most general information possible that still produces a specific rendering. For data objects that never provide device-specific renderings, the simplest implementation of this method is to copy the input <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> to the output <b>FORMATETC</b>, store a <b>NULL</b> in the <b>ptd</b> member of the output <b>FORMATETC</b>, and return DATA_S_SAMEFORMATETC.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-getcanonicalformatetc#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT GetCanonicalFormatEtc(winmdroot.System.Com.FORMATETC* pformatectIn, winmdroot.System.Com.FORMATETC* pformatetcOut)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.FORMATETC* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IDataObject*)Unsafe.AsPointer(ref this), pformatectIn, pformatetcOut);
			}

			/// <inheritdoc cref="SetData(winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.STGMEDIUM*, winmdroot.Foundation.BOOL)"/>
			internal unsafe winmdroot.Foundation.HRESULT SetData(in winmdroot.System.Com.FORMATETC pformatetc, in winmdroot.System.Com.STGMEDIUM pmedium, winmdroot.Foundation.BOOL fRelease)
			{
				fixed (winmdroot.System.Com.STGMEDIUM* pmediumLocal = &pmedium)
				{
					fixed (winmdroot.System.Com.FORMATETC* pformatetcLocal = &pformatetc)
					{
						winmdroot.Foundation.HRESULT __result = this.SetData(pformatetcLocal, pmediumLocal, fRelease);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT SetData(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium, winmdroot.Foundation.BOOL fRelease)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.SetData(pformatetc, pmedium, fRelease);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Called by an object containing a data source to transfer data to the object that implements this method.</summary>
			/// <param name="pformatetc">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure defining the format used by the data object when interpreting the data contained in the storage medium.</param>
			/// <param name="pmedium">A pointer to the <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> structure defining the storage medium in which the data is being passed.</param>
			/// <param name="fRelease">If <b>TRUE</b>, the data object called, which implements <b>SetData</b>, owns the storage medium after the call returns. This means it must free the medium after it has been used by calling the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-releasestgmedium">ReleaseStgMedium</a> function. If <b>FALSE</b>, the caller retains ownership of the storage medium and the data object called uses the storage medium for the duration of the call only.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><b>SetData</b> allows another object to attempt to send data to the implementing data object. A data object implements this method if it supports receiving data from another object. If it does not support this, it should be implemented to return E_NOTIMPL. The caller allocates the storage medium indicated by the <i>pmedium</i> parameter, in which the data is passed. The data object called does not take ownership of the data until it has successfully received it and no error code is returned. The value of the <i>fRelease</i> parameter indicates the ownership of the medium after the call returns. <b>FALSE</b> indicates the caller still owns the medium, and the data object only has the use of it during the call; <b>TRUE</b> indicates that the data object now owns it and must release it when it is no longer needed. The type of medium specified in the <i>pformatetc</i> and <i>pmedium</i> parameters must be the same. For example, one cannot be a global handle and the other a stream.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-setdata#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT SetData(winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium, winmdroot.Foundation.BOOL fRelease)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IDataObject*)Unsafe.AsPointer(ref this), pformatetc, pmedium, fRelease);
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT EnumFormatEtc(IDataObject* pThis, uint dwDirection, winmdroot.System.Com.IEnumFORMATETC** ppenumFormatEtc)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.EnumFormatEtc(dwDirection, ppenumFormatEtc);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Creates an object to enumerate the formats supported by a data object.</summary>
			/// <param name="dwDirection">
			/// <para>The direction of the data.  Possible values come from the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ne-objidl-datadir">DATADIR</a> enumeration. The value DATADIR_GET enumerates the formats that can be passed in to a call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a>. The value DATADIR_SET enumerates those formats that can be passed in to a call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-setdata">IDataObject::SetData</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-enumformatetc#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppenumFormatEtc">A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumformatetc">IEnumFORMATETC</a> pointer variable that receives the interface pointer to the new enumerator object.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><b>EnumFormatEtc</b> creates an enumerator object that can be used to determine all of the ways the data object can describe data in a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure, and provides a pointer to its <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumformatetc">IEnumFORMATETC</a> interface. This is one of the standard enumerator interfaces. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> Having obtained the pointer, the caller can enumerate the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structures by calling the enumeration methods of <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumformatetc">IEnumFORMATETC</a>. Because the formats can change over time, there is no guarantee that an enumerated format is currently supported because the formats can change over time. Accordingly, applications should treat the enumeration as a hint of the format types that can be passed. The caller is responsible for calling <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">Release</a> when it is finished with the enumerator. <b>EnumFormatEtc</b> is called when one of the following actions occurs: </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-enumformatetc#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT EnumFormatEtc(uint dwDirection, winmdroot.System.Com.IEnumFORMATETC** ppenumFormatEtc)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,uint ,winmdroot.System.Com.IEnumFORMATETC** ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IDataObject*)Unsafe.AsPointer(ref this), dwDirection, ppenumFormatEtc);
			}

			/// <inheritdoc cref="DAdvise(winmdroot.System.Com.FORMATETC*, uint, winmdroot.System.Com.IAdviseSink*, uint*)"/>
			internal unsafe winmdroot.Foundation.HRESULT DAdvise(in winmdroot.System.Com.FORMATETC pformatetc, uint advf, winmdroot.System.Com.IAdviseSink* pAdvSink, out uint pdwConnection)
			{
				fixed (uint* pdwConnectionLocal = &pdwConnection)
				{
					fixed (winmdroot.System.Com.FORMATETC* pformatetcLocal = &pformatetc)
					{
						winmdroot.Foundation.HRESULT __result = this.DAdvise(pformatetcLocal, advf, pAdvSink, pdwConnectionLocal);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT DAdvise(IDataObject* pThis, winmdroot.System.Com.FORMATETC* pformatetc, uint advf, winmdroot.System.Com.IAdviseSink* pAdvSink, uint* pdwConnection)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.DAdvise(pformatetc, advf, pAdvSink, pdwConnection);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Called by an object supporting an advise sink to create a connection between a data object and the advise sink. This enables the advise sink to be notified of changes in the data of the object.</summary>
			/// <param name="pformatetc">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure that defines the format, target device, aspect, and medium that will be used for future notifications. For example, one sink may want to know only when the bitmap representation of the data in the data object changes. Another sink may be interested in only the metafile format of the same object. Each advise sink is notified when the data of interest changes. This data is passed back to the advise sink when notification occurs.</param>
			/// <param name="advf">
			/// <para>A group of flags for controlling the advisory connection. Possible values are from the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ne-objidl-advf">ADVF</a> enumeration. However, only some of the possible <b>ADVF</b> values are relevant for this method. The following table briefly describes the relevant values. </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-dadvise#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pAdvSink">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-iadvisesink">IAdviseSink</a> interface on the advisory sink that will receive the change notification.</param>
			/// <param name="pdwConnection">A token that identifies this connection. You can use this token later to delete the advisory connection (by passing it to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-dunadvise">IDataObject::DUnadvise</a>). If this value is 0, the connection was not established.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><b>DAdvise</b> creates a change notification connection between a data object and the caller. The caller provides an advisory sink to which the notifications can be sent when the object's data changes. Objects used simply for data transfer typically do not support advisory notifications and return OLE_E_ADVISENOTSUPPORTED from <b>DAdvise</b>. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> The object supporting the advise sink calls <b>DAdvise</b> to set up the connection, specifying the format, aspect, medium, and/or target device of interest in the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> structure passed in. If the data object does not support one or more of the requested attributes or the sending of notifications at all, it can refuse the connection by returning OLE_E_ADVISENOTSUPPORTED. Containers of linked objects can set up advisory connections directly with the bound link source or indirectly through the standard OLE link object that manages the connection. Connections set up with the bound link source are not automatically deleted. The container must explicitly call <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-dunadvise">IDataObject::DUnadvise</a> on the bound link source to delete an advisory connection. The OLE link object, manipulated through the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-iolelink">IOleLink</a> interface, is implemented in the default handler. Connections set up through the OLE link object are destroyed when the link object is deleted. The OLE default link object creates a "wildcard advise" with the link source so OLE can maintain the time of last change. This advise is specifically used to note the time that anything changed. OLE ignores all data formats that may have changed, noting only the time of last change. To allow wildcard advises, set the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> members as follows before calling <b>DAdvise</b>:</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-dadvise#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT DAdvise(winmdroot.System.Com.FORMATETC* pformatetc, uint advf, winmdroot.System.Com.IAdviseSink* pAdvSink, uint* pdwConnection)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,uint ,winmdroot.System.Com.IAdviseSink* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IDataObject*)Unsafe.AsPointer(ref this), pformatetc, advf, pAdvSink, pdwConnection);
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT DUnadvise(IDataObject* pThis, uint dwConnection)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.DUnadvise(dwConnection);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Destroys a notification connection that had been previously set up.</summary>
			/// <param name="dwConnection">A token that specifies the connection to be removed. Use the value returned by <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-dadvise">IDataObject::DAdvise</a> when the connection was originally established.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>This methods destroys a notification created with a call to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-dadvise">IDataObject::DAdvise</a> method. If the advisory connection being deleted was initially set up by delegating the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-dadvise">IDataObject::DAdvise</a> call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataadviseholder-advise">IDataAdviseHolder::Advise</a>, you must delegate this call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataadviseholder-unadvise">IDataAdviseHolder::Unadvise</a> to delete it.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-dunadvise#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public winmdroot.Foundation.HRESULT DUnadvise(uint dwConnection)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IDataObject*)Unsafe.AsPointer(ref this), dwConnection);
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT EnumDAdvise(IDataObject* pThis, winmdroot.System.Com.IEnumSTATDATA** ppenumAdvise)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.EnumDAdvise(ppenumAdvise);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Creates an object that can be used to enumerate the current advisory connections.</summary>
			/// <param name="ppenumAdvise">A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumstatdata">IEnumSTATDATA</a> pointer variable that receives the interface pointer to the new enumerator object. If the implementation sets *<i>ppenumAdvise</i> to <b>NULL</b>, there are no connections to advise sinks at this time.</param>
			/// <returns>
			/// <para>This method returns S_OK if the enumerator object is successfully instantiated or there are no connections. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>The enumerator object created by this method implements the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumstatdata">IEnumSTATDATA</a> interface. <b>IEnumSTATDATA</b> permits the enumeration of the data stored in an array of <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-statdata">STATDATA</a> structures. Each of these structures provides information on a single advisory connection, and includes <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> and <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ne-objidl-advf">ADVF</a> information, as well as the pointer to the advise sink and the token representing the connection. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> It is recommended that you use the OLE data advise holder object to handle advisory connections. With the pointer obtained through a call to <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-createdataadviseholder">CreateDataAdviseHolder</a>, implementing <b>IDataObject::EnumDAdvise</b> becomes a simple matter of delegating the call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataadviseholder-enumadvise">IDataAdviseHolder::EnumAdvise</a>. This creates the enumerator and supplies the pointer to the OLE implementation of <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumstatdata">IEnumSTATDATA</a>. At that point, you can call its methods to enumerate the current advisory connections.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-idataobject-enumdadvise#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT EnumDAdvise(winmdroot.System.Com.IEnumSTATDATA** ppenumAdvise)
			{
				return ((delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.IEnumSTATDATA** ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IDataObject*)Unsafe.AsPointer(ref this), ppenumAdvise);
			}

			internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged

			{
				var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
				if (hr.Succeeded)

				{
					ppv = (T*)pv;
				}
				else

				{
					ppv = null;
				}

				return hr;
			}

			internal struct Vtbl
			{
				internal delegate *unmanaged [Stdcall]<IDataObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

				internal delegate *unmanaged [Stdcall]<IDataObject*,uint> AddRef_2;

				internal delegate *unmanaged [Stdcall]<IDataObject*,uint> Release_3;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT> GetData_4;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT> GetDataHere_5;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.Foundation.HRESULT> QueryGetData_6;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.FORMATETC* ,winmdroot.Foundation.HRESULT> GetCanonicalFormatEtc_7;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> SetData_8;

				internal delegate *unmanaged [Stdcall]<IDataObject*,uint ,winmdroot.System.Com.IEnumFORMATETC** ,winmdroot.Foundation.HRESULT> EnumFormatEtc_9;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.FORMATETC* ,uint ,winmdroot.System.Com.IAdviseSink* ,uint* ,winmdroot.Foundation.HRESULT> DAdvise_10;

				internal delegate *unmanaged [Stdcall]<IDataObject*,uint ,winmdroot.Foundation.HRESULT> DUnadvise_11;

				internal delegate *unmanaged [Stdcall]<IDataObject*,winmdroot.System.Com.IEnumSTATDATA** ,winmdroot.Foundation.HRESULT> EnumDAdvise_12;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->GetData_4 = &GetData;
				vtable->GetDataHere_5 = &GetDataHere;
				vtable->QueryGetData_6 = &QueryGetData;
				vtable->GetCanonicalFormatEtc_7 = &GetCanonicalFormatEtc;
				vtable->SetData_8 = &SetData;
				vtable->EnumFormatEtc_9 = &EnumFormatEtc;
				vtable->DAdvise_10 = &DAdvise;
				vtable->DUnadvise_11 = &DUnadvise;
				vtable->EnumDAdvise_12 = &EnumDAdvise;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{0000010e-0000-0000-c000-000000000046}</value>
			internal static readonly Guid IID_Guid = new Guid(0x0000010E, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0x0E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("0000010E-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.0")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetData(winmdroot.System.Com.FORMATETC* pformatetcIn, winmdroot.System.Com.STGMEDIUM* pmedium);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetDataHere(winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT QueryGetData(winmdroot.System.Com.FORMATETC* pformatetc);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetCanonicalFormatEtc(winmdroot.System.Com.FORMATETC* pformatectIn, winmdroot.System.Com.FORMATETC* pformatetcOut);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT SetData(winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pmedium, winmdroot.Foundation.BOOL fRelease);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT EnumFormatEtc(uint dwDirection, winmdroot.System.Com.IEnumFORMATETC** ppenumFormatEtc);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT DAdvise(winmdroot.System.Com.FORMATETC* pformatetc, uint advf, winmdroot.System.Com.IAdviseSink* pAdvSink, uint* pdwConnection);

								[PreserveSig()]
winmdroot.Foundation.HRESULT DUnadvise(uint dwConnection);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT EnumDAdvise(winmdroot.System.Com.IEnumSTATDATA** ppenumAdvise);
			}
		}
	}
}