File: Windows.Win32.IFont.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 System.Ole
	{
		[Guid("BEF6E002-A874-101A-8BBA-00AA00300CAB")]
		[SupportedOSPlatform("windows5.0")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IFont
			:IVTable<IFont,IFont.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]<IFont*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IFont*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

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

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

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Name(IFont* pThis, winmdroot.Foundation.BSTR* pName)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pName = __object.Name;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the name of the font family.</summary>
			/// <returns>
			/// <para>The method supports the standard return value <b>E_UNEXPECTED</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_name">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Foundation.BSTR Name
			{
				get
				{
					winmdroot.Foundation.BSTR __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Name(IFont* pThis, winmdroot.Foundation.BSTR name)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Name = name;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Size(IFont* pThis, winmdroot.System.Com.CY* pSize)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pSize = __object.Size;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the point size of the font.</summary>
			/// <returns>
			/// <para>The method supports the standard return value <b>E_UNEXPECTED</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_size">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.System.Com.CY Size
			{
				get
				{
					winmdroot.System.Com.CY __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Com.CY* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Com.CY ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Size(IFont* pThis, winmdroot.System.Com.CY size)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Size = size;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Bold(IFont* pThis, winmdroot.Foundation.BOOL* pBold)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pBold = __object.Bold;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the font's current Bold property.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_bold">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Foundation.BOOL Bold
			{
				get
				{
					winmdroot.Foundation.BOOL __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Bold(IFont* pThis, winmdroot.Foundation.BOOL bold)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Bold = bold;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Italic(IFont* pThis, winmdroot.Foundation.BOOL* pItalic)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pItalic = __object.Italic;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the font's current Italic property.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_italic">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Foundation.BOOL Italic
			{
				get
				{
					winmdroot.Foundation.BOOL __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Italic(IFont* pThis, winmdroot.Foundation.BOOL italic)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Italic = italic;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Underline(IFont* pThis, winmdroot.Foundation.BOOL* pUnderline)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pUnderline = __object.Underline;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the font's current Underline property.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_underline">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Foundation.BOOL Underline
			{
				get
				{
					winmdroot.Foundation.BOOL __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Underline(IFont* pThis, winmdroot.Foundation.BOOL underline)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Underline = underline;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Strikethrough(IFont* pThis, winmdroot.Foundation.BOOL* pStrikethrough)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pStrikethrough = __object.Strikethrough;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the font's current Strikethrough property.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_strikethrough">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Foundation.BOOL Strikethrough
			{
				get
				{
					winmdroot.Foundation.BOOL __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Strikethrough(IFont* pThis, winmdroot.Foundation.BOOL strikethrough)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Strikethrough = strikethrough;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Weight(IFont* pThis, short* pWeight)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pWeight = __object.Weight;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the font's current Weight property.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_weight">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal short Weight
			{
				get
				{
					short __result;
					((delegate *unmanaged [Stdcall]<IFont*,short* ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,short ,winmdroot.Foundation.HRESULT>)lpVtbl[16])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Weight(IFont* pThis, short weight)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Weight = weight;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_Charset(IFont* pThis, short* pCharset)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*pCharset = __object.Charset;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the character set used in the font.</summary>
			/// <returns>
			/// <para>This method can return one of these values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_charset">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			internal short Charset
			{
				get
				{
					short __result;
					((delegate *unmanaged [Stdcall]<IFont*,short* ,winmdroot.Foundation.HRESULT>)lpVtbl[17])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
				set
				{
					((delegate *unmanaged [Stdcall]<IFont*,short ,winmdroot.Foundation.HRESULT>)lpVtbl[18])((IFont*)Unsafe.AsPointer(ref this), value).ThrowOnFailure();
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT put_Charset(IFont* pThis, short charset)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					__object.Charset = charset;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT get_hFont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT* phFont)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					*phFont = __object.hFont;
					return winmdroot.Foundation.HRESULT.S_OK;
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves a handle to the font described by this font object.</summary>
			/// <returns>
			/// <para>The method supports the standard return values <b>E_UNEXPECTED</b> and <b>E_OUTOFMEMORY</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> The font object maintains ownership of the <b>HFONT</b> and can destroy it at any time without prior notification. If the caller needs to secure this font for a limited period of time, it can call <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-addrefhfont">IFont::AddRefHfont</a> and <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-releasehfont">IFont::ReleaseHfont</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-get_hfont#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			internal winmdroot.Graphics.Gdi.HFONT hFont
			{
				get
				{
					winmdroot.Graphics.Gdi.HFONT __result;
					((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT>)lpVtbl[19])((IFont*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
					return __result;
				}
			}

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

			/// <summary>Creates a duplicate font object.</summary>
			/// <param name="ppFont">
			/// <para>Address of <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nn-ocidl-ifont">IFont</a> pointer variable that receives the interface pointer to the new font object. The caller must call <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">IFont::Release</a> when this new font object is no longer needed.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-clone#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>The method supports the standard return values <b>E_UNEXPECTED</b> and <b>E_OUTOFMEMORY</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> The new font object is entirely independent of the first. The caller is responsible for releasing this new object when it is no longer needed. This method does not affect the reference count of the font being cloned.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-clone#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void Clone(winmdroot.System.Ole.IFont** ppFont)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Ole.IFont** ,winmdroot.Foundation.HRESULT>)lpVtbl[20])((IFont*)Unsafe.AsPointer(ref this), ppFont).ThrowOnFailure();
			}

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

			/// <summary>Compares this font object to another for equivalence.</summary>
			/// <param name="pFontOther">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nn-ocidl-ifont">IFont</a> interface on the font object to be compared to this font. The reference count of the object referred to by this pointer is not affected by the comparison operation.</param>
			/// <returns>
			/// <para>The method supports the standard return value <b>E_UNEXPECTED</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-isequal">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void IsEqual(winmdroot.System.Ole.IFont* pFontOther)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Ole.IFont* ,winmdroot.Foundation.HRESULT>)lpVtbl[21])((IFont*)Unsafe.AsPointer(ref this), pFontOther).ThrowOnFailure();
			}

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

			/// <summary>Converts the scaling factor for this font between logical units and HIMETRIC units.</summary>
			/// <param name="cyLogical">The font size, in logical units.</param>
			/// <param name="cyHimetric">The font size, in <b>HIMETRIC</b> units.</param>
			/// <returns>The method supports the standard return values E_UNEXPECTED, E_INVALIDARG, and S_OK.</returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-setratio">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public void SetRatio(int cyLogical, int cyHimetric)
			{
				((delegate *unmanaged [Stdcall]<IFont*,int ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[22])((IFont*)Unsafe.AsPointer(ref this), cyLogical, cyHimetric).ThrowOnFailure();
			}

			/// <inheritdoc cref="QueryTextMetrics(winmdroot.Graphics.Gdi.TEXTMETRICW*)"/>
			internal unsafe void QueryTextMetrics(out winmdroot.Graphics.Gdi.TEXTMETRICW pTM)
			{
				fixed (winmdroot.Graphics.Gdi.TEXTMETRICW* pTMLocal = &pTM)
				{
					this.QueryTextMetrics(pTMLocal);
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT QueryTextMetrics(IFont* pThis, winmdroot.Graphics.Gdi.TEXTMETRICW* pTM)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.QueryTextMetrics(pTM);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Fills a caller-allocated structure with information about the font.</summary>
			/// <param name="pTM">
			/// <para>Pointer to the caller-allocated structure that receives the font information. The <b>TEXTMETRICOLE</b> structure is defined as a <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-textmetrica">TEXTMETRICW</a> structure.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-querytextmetrics#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>The method supports the standard return value <b>E_UNEXPECTED</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><h3><a id="Notes_to_Implementers"></a><a id="notes_to_implementers"></a><a id="NOTES_TO_IMPLEMENTERS"></a>Notes to Implementers</h3> <b>E_NOTIMPL</b> is not a valid return value. Font objects must always provide their font information through this call unless other errors occur.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-querytextmetrics#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void QueryTextMetrics(winmdroot.Graphics.Gdi.TEXTMETRICW* pTM)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.TEXTMETRICW* ,winmdroot.Foundation.HRESULT>)lpVtbl[23])((IFont*)Unsafe.AsPointer(ref this), pTM).ThrowOnFailure();
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT AddRefHfont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT hFont)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.AddRefHfont(hFont);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Notifies the font object that the previously realized font identified with hFont should remain valid until ReleaseHfont is called or the font object itself is released completely.</summary>
			/// <param name="hFont">Font handle previously realized through <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-get_hfont">get_hFont</a> to be locked in the font object's cache.</param>
			/// <returns>
			/// <para>The method supports the standard return values <b>E_UNEXPECTED</b> and <b>E_INVALIDARG</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-addrefhfont">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public void AddRefHfont(winmdroot.Graphics.Gdi.HFONT hFont)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[24])((IFont*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure();
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT ReleaseHfont(IFont* pThis, winmdroot.Graphics.Gdi.HFONT hFont)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.ReleaseHfont(hFont);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Notifies the font object that the caller that previously locked this font in the cache with IFont::AddRefHfont no longer requires the lock.</summary>
			/// <param name="hFont">
			/// <para>A font handle previously realized through <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-get_hfont">IFont::get_hFont</a>. This value was passed to a previous call to <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-addrefhfont">IFont::AddRefHfont</a> to lock the font, and the caller would now like to unlock the font in the cache.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-releasehfont#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>The method supports the standard return values <b>E_UNEXPECTED</b> and <b>E_INVALIDARG</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-releasehfont">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public void ReleaseHfont(winmdroot.Graphics.Gdi.HFONT hFont)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT>)lpVtbl[25])((IFont*)Unsafe.AsPointer(ref this), hFont).ThrowOnFailure();
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT SetHdc(IFont* pThis, winmdroot.Graphics.Gdi.HDC hDC)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.SetHdc(hDC);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Provides a device context to the font that describes the logical mapping mode.</summary>
			/// <param name="hDC">A handle to the device context in which to select the font.</param>
			/// <returns>
			/// <para>The method supports the standard return value <b>E_INVALIDARG</b>, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>The logical mapping mode affects the font's internal computation of its point size so that when the caller asks for a font handle by calling <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ifont-get_hfont">IFont::get_hFont</a>, the font is already properly scaled to the device context. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> The caller retains ownership of this device context which must remain valid for the lifetime of the font object. Thus, the device context passed should be a memory device context (from the function <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createcompatibledc">CreateCompatibleDC</a>) and not a screen device context (from <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createdca">CreateDC</a>, <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getdc">GetDC</a>, or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a>) because screen device contexts are a limited system resource.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ifont-sethdc#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public void SetHdc(winmdroot.Graphics.Gdi.HDC hDC)
			{
				((delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT>)lpVtbl[26])((IFont*)Unsafe.AsPointer(ref this), hDC).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]<IFont*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

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

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

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> get_Name_4;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT> put_Name_5;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Com.CY* ,winmdroot.Foundation.HRESULT> get_Size_6;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Com.CY ,winmdroot.Foundation.HRESULT> put_Size_7;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Bold_8;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Bold_9;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Italic_10;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Italic_11;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Underline_12;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Underline_13;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT> get_Strikethrough_14;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> put_Strikethrough_15;

				internal delegate *unmanaged [Stdcall]<IFont*,short* ,winmdroot.Foundation.HRESULT> get_Weight_16;

				internal delegate *unmanaged [Stdcall]<IFont*,short ,winmdroot.Foundation.HRESULT> put_Weight_17;

				internal delegate *unmanaged [Stdcall]<IFont*,short* ,winmdroot.Foundation.HRESULT> get_Charset_18;

				internal delegate *unmanaged [Stdcall]<IFont*,short ,winmdroot.Foundation.HRESULT> put_Charset_19;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT* ,winmdroot.Foundation.HRESULT> get_hFont_20;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Ole.IFont** ,winmdroot.Foundation.HRESULT> Clone_21;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.System.Ole.IFont* ,winmdroot.Foundation.HRESULT> IsEqual_22;

				internal delegate *unmanaged [Stdcall]<IFont*,int ,int ,winmdroot.Foundation.HRESULT> SetRatio_23;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.TEXTMETRICW* ,winmdroot.Foundation.HRESULT> QueryTextMetrics_24;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> AddRefHfont_25;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HFONT ,winmdroot.Foundation.HRESULT> ReleaseHfont_26;

				internal delegate *unmanaged [Stdcall]<IFont*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Foundation.HRESULT> SetHdc_27;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->get_Name_4 = &get_Name;
				vtable->put_Name_5 = &put_Name;
				vtable->get_Size_6 = &get_Size;
				vtable->put_Size_7 = &put_Size;
				vtable->get_Bold_8 = &get_Bold;
				vtable->put_Bold_9 = &put_Bold;
				vtable->get_Italic_10 = &get_Italic;
				vtable->put_Italic_11 = &put_Italic;
				vtable->get_Underline_12 = &get_Underline;
				vtable->put_Underline_13 = &put_Underline;
				vtable->get_Strikethrough_14 = &get_Strikethrough;
				vtable->put_Strikethrough_15 = &put_Strikethrough;
				vtable->get_Weight_16 = &get_Weight;
				vtable->put_Weight_17 = &put_Weight;
				vtable->get_Charset_18 = &get_Charset;
				vtable->put_Charset_19 = &put_Charset;
				vtable->get_hFont_20 = &get_hFont;
				vtable->Clone_21 = &Clone;
				vtable->IsEqual_22 = &IsEqual;
				vtable->SetRatio_23 = &SetRatio;
				vtable->QueryTextMetrics_24 = &QueryTextMetrics;
				vtable->AddRefHfont_25 = &AddRefHfont;
				vtable->ReleaseHfont_26 = &ReleaseHfont;
				vtable->SetHdc_27 = &SetHdc;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{bef6e002-a874-101a-8bba-00aa00300cab}</value>
			internal static readonly Guid IID_Guid = new Guid(0xBEF6E002, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0x02,0xE0,0xF6,0xBE,0x74,0xA8,0x1A,0x10,0x8B,0xBA,0x00,0xAA,0x00,0x30,0x0C,0xAB					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("BEF6E002-A874-101A-8BBA-00AA00300CAB"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.0")]
			internal interface Interface
			{
				winmdroot.Foundation.BSTR Name
				{
					get;
					set;
				}

				winmdroot.System.Com.CY Size
				{
					get;
					set;
				}

				winmdroot.Foundation.BOOL Bold
				{
					get;
					set;
				}

				winmdroot.Foundation.BOOL Italic
				{
					get;
					set;
				}

				winmdroot.Foundation.BOOL Underline
				{
					get;
					set;
				}

				winmdroot.Foundation.BOOL Strikethrough
				{
					get;
					set;
				}

				short Weight
				{
					get;
					set;
				}

				short Charset
				{
					get;
					set;
				}

				winmdroot.Graphics.Gdi.HFONT hFont
				{
					get;
				}

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.System.Ole.IFont** ppFont);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT IsEqual(winmdroot.System.Ole.IFont* pFontOther);

								[PreserveSig()]
winmdroot.Foundation.HRESULT SetRatio(int cyLogical, int cyHimetric);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT QueryTextMetrics(winmdroot.Graphics.Gdi.TEXTMETRICW* pTM);

								[PreserveSig()]
winmdroot.Foundation.HRESULT AddRefHfont(winmdroot.Graphics.Gdi.HFONT hFont);

								[PreserveSig()]
winmdroot.Foundation.HRESULT ReleaseHfont(winmdroot.Graphics.Gdi.HFONT hFont);

								[PreserveSig()]
winmdroot.Foundation.HRESULT SetHdc(winmdroot.Graphics.Gdi.HDC hDC);
			}
		}
	}
}