// ------------------------------------------------------------------------------ // <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,SYSLIB1092,CS3021,CS3019 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("00000103-0000-0000-C000-000000000046")] [SupportedOSPlatform("windows5.0")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IEnumFORMATETC :IComIID { /// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] 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]<IEnumFORMATETC*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IEnumFORMATETC*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint>)lpVtbl[1])((IEnumFORMATETC*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint>)lpVtbl[2])((IEnumFORMATETC*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="Next(uint, winmdroot.System.Com.FORMATETC*, uint*)"/> internal unsafe winmdroot.Foundation.HRESULT Next(Span<winmdroot.System.Com.FORMATETC> rgelt, out uint pceltFetched) { fixed (uint* pceltFetchedLocal = &pceltFetched) { fixed (winmdroot.System.Com.FORMATETC* rgeltLocal = rgelt) { winmdroot.Foundation.HRESULT __result = this.Next((uint )rgelt.Length, rgeltLocal, pceltFetchedLocal); return __result; } } } /// <inheritdoc cref="Next(uint, winmdroot.System.Com.FORMATETC*, uint*)"/> internal unsafe winmdroot.Foundation.HRESULT Next(Span<winmdroot.System.Com.FORMATETC> rgelt) { fixed (winmdroot.System.Com.FORMATETC* rgeltLocal = rgelt) { winmdroot.Foundation.HRESULT __result = this.Next((uint )rgelt.Length, rgeltLocal, default(uint* )); return __result; } } /// <summary>Retrieves the specified number of items in the enumeration sequence. (IEnumFORMATETC.Next)</summary> /// <param name="celt">The number of items to be retrieved. If there are fewer than the requested number of items left in the sequence, this method retrieves the remaining elements.</param> /// <param name="rgelt"> /// <para>An array of enumerated items. The enumerator is responsible for allocating any memory, and the caller is responsible for freeing it. If <i>celt</i> is greater than 1, the caller must also pass a non-<b>NULL</b> pointer passed to <i>pceltFetched</i> to know how many pointers to release.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ienumformatetc-next#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="pceltFetched">The number of items that were retrieved. This parameter is always less than or equal to the number of items requested. This parameter can be <b>NULL</b> if <i>celt</i> is 1.</param> /// <returns>If the method retrieves the number of items requested, the return value is S_OK. Otherwise, it is S_FALSE.</returns> /// <remarks> /// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ienumformatetc-next">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.Foundation.HRESULT Next(uint celt, winmdroot.System.Com.FORMATETC* rgelt, [Optional] uint* pceltFetched) { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint ,winmdroot.System.Com.FORMATETC* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IEnumFORMATETC*)Unsafe.AsPointer(ref this), celt, rgelt, pceltFetched); } /// <summary>Skips over the specified number of items in the enumeration sequence. (IEnumFORMATETC.Skip)</summary> /// <param name="celt">The number of items to be skipped.</param> /// <returns>If the method skips the number of items requested, the return value is S_OK. Otherwise, it is S_FALSE.</returns> /// <remarks> /// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ienumformatetc-skip">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public winmdroot.Foundation.HRESULT Skip(uint celt) { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IEnumFORMATETC*)Unsafe.AsPointer(ref this), celt); } /// <summary>Resets the enumeration sequence to the beginning. (IEnumFORMATETC.Reset)</summary> /// <returns>This method returns S_OK on success.</returns> /// <remarks>There is no guarantee that the same set of objects will be enumerated after the reset operation has completed. A static collection is reset to the beginning, but it can be too expensive for some collections, such as files in a directory, to guarantee this condition.</remarks> public winmdroot.Foundation.HRESULT Reset() { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IEnumFORMATETC*)Unsafe.AsPointer(ref this)); } /// <summary>Creates a new enumerator that contains the same enumeration state as the current one. (IEnumFORMATETC.Clone)</summary> /// <param name="ppenum">Address of 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 enumeration object. If the method is unsuccessful, the value of this output variable is undefined.</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><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ienumformatetc-clone">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.System.Com.IEnumFORMATETC** ppenum) { return ((delegate *unmanaged [Stdcall]<IEnumFORMATETC*,winmdroot.System.Com.IEnumFORMATETC** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IEnumFORMATETC*)Unsafe.AsPointer(ref this), ppenum); } internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv) where T : unmanaged { Guid guid = typeof(T).GUID; void* pv; var hr = this.QueryInterface(&guid, &pv); if (hr.Succeeded) { ppv = (T*)pv; } else { ppv = null; } return hr; } internal struct Vtbl { internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint ,winmdroot.System.Com.FORMATETC* ,uint* ,winmdroot.Foundation.HRESULT> Next_4; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,uint ,winmdroot.Foundation.HRESULT> Skip_5; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,winmdroot.Foundation.HRESULT> Reset_6; internal delegate *unmanaged [Stdcall]<IEnumFORMATETC*,winmdroot.System.Com.IEnumFORMATETC** ,winmdroot.Foundation.HRESULT> Clone_7; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{00000103-0000-0000-c000-000000000046}</value> internal static readonly Guid IID_Guid = new Guid(0x00000103, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); readonly ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => ref Unsafe.AsRef(in IID_Guid); } [Guid("00000103-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.0")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT Next(uint celt, winmdroot.System.Com.FORMATETC* rgelt, [Optional] uint* pceltFetched); [PreserveSig()] winmdroot.Foundation.HRESULT Skip(uint celt); [PreserveSig()] winmdroot.Foundation.HRESULT Reset(); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.System.Com.IEnumFORMATETC** ppenum); } } } }