File: Windows.Win32.IPropertyDescriptionList.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <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 UI.Shell.PropertiesSystem
	{
		[Guid("1F9FC1D0-C39B-4B26-817F-011967D3440E")]
		[SupportedOSPlatform("windows6.0.6000")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IPropertyDescriptionList
			:IVTable<IPropertyDescriptionList,IPropertyDescriptionList.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]<IPropertyDescriptionList*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IPropertyDescriptionList*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

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

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

			/// <inheritdoc cref="GetCount(uint*)"/>
			internal unsafe void GetCount(out uint pcElem)
			{
				fixed (uint* pcElemLocal = &pcElem)
				{
					this.GetCount(pcElemLocal);
				}
			}

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

			/// <summary>Gets the number of properties included in the property list.</summary>
			/// <param name="pcElem">
			/// <para>Type: <b>UINT*</b> When this method returns, contains a pointer to the count of properties.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/propsys/nf-propsys-ipropertydescriptionlist-getcount#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/propsys/nf-propsys-ipropertydescriptionlist-getcount">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void GetCount(uint* pcElem)
			{
				((delegate *unmanaged [Stdcall]<IPropertyDescriptionList*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IPropertyDescriptionList*)Unsafe.AsPointer(ref this), pcElem).ThrowOnFailure();
			}

			/// <inheritdoc cref="GetAt(uint, global::System.Guid*, void**)"/>
			internal unsafe void GetAt(uint iElem, in global::System.Guid riid, out void* ppv)
			{
				fixed (void** ppvLocal = &ppv)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						this.GetAt(iElem, riidLocal, ppvLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetAt(IPropertyDescriptionList* pThis, uint iElem, global::System.Guid* riid, void** ppv)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetAt(iElem, riid, ppv);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the property description at the specified index in a property description list.</summary>
			/// <param name="iElem">
			/// <para>Type: <b>UINT</b> The number of the property in the list string.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/propsys/nf-propsys-ipropertydescriptionlist-getat#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="riid">
			/// <para>Type: <b>REFIID</b> A reference to the IID of the requested property description interface, typically IID_IPropertyDescription.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/propsys/nf-propsys-ipropertydescriptionlist-getat#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppv">
			/// <para>Type: <b>void**</b> When this method returns, contains the interface pointer requested in <i>riid</i>. Typically, this is <a href="https://docs.microsoft.com/windows/desktop/api/propsys/nn-propsys-ipropertydescription">IPropertyDescription</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/propsys/nf-propsys-ipropertydescriptionlist-getat#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
			/// </returns>
			/// <remarks>It is recommended that you use the IID_PPV_ARGS macro, defined in objbase.h, to package the <i>riid</i> and <i>ppv</i> parameters. This macro provides the correct IID based on the interface pointed to by the value in <i>ppv</i>, eliminating the possibility of a coding error.</remarks>
			public unsafe void GetAt(uint iElem, global::System.Guid* riid, void** ppv)
			{
				((delegate *unmanaged [Stdcall]<IPropertyDescriptionList*,uint ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IPropertyDescriptionList*)Unsafe.AsPointer(ref this), iElem, riid, ppv).ThrowOnFailure();
			}

			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]<IPropertyDescriptionList*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

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

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

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

				internal delegate *unmanaged [Stdcall]<IPropertyDescriptionList*,uint ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> GetAt_5;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->GetCount_4 = &GetCount;
				vtable->GetAt_5 = &GetAt;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{1f9fc1d0-c39b-4b26-817f-011967d3440e}</value>
			internal static readonly Guid IID_Guid = new Guid(0x1F9FC1D0, 0xC39B, 0x4B26, 0x81, 0x7F, 0x01, 0x19, 0x67, 0xD3, 0x44, 0x0E);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0xD0,0xC1,0x9F,0x1F,0x9B,0xC3,0x26,0x4B,0x81,0x7F,0x01,0x19,0x67,0xD3,0x44,0x0E					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("1F9FC1D0-C39B-4B26-817F-011967D3440E"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows6.0.6000")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetCount(uint* pcElem);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetAt(uint iElem, global::System.Guid* riid, void** ppv);
			}
		}
	}
}