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

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

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

			/// <inheritdoc cref="get_Handle(winmdroot.System.Ole.OLE_HANDLE*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_Handle(out winmdroot.System.Ole.OLE_HANDLE pHandle)
			{
				fixed (winmdroot.System.Ole.OLE_HANDLE* pHandleLocal = &pHandle)
				{
					winmdroot.Foundation.HRESULT __result = this.get_Handle(pHandleLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the handle to the picture managed within this picture object to a specified location.</summary>
			/// <param name="pHandle">A pointer to a variable that receives the handle. The caller is responsible for this handle upon successful return. The variable is set to <b>NULL</b> on failure.</param>
			/// <returns>
			/// <para>This method supports the standard return values E_FAIL and E_OUTOFMEMORY, 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 picture object may retain ownership of the picture. However, the caller can be assured that the picture will remain valid until either the caller specifically destroys the picture or the picture object is itself destroyed. The <i>fOwn</i> parameter to <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-olecreatepictureindirect">OleCreatePictureIndirect</a> determines ownership when the picture object is created. <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-oleloadpicture">OleLoadPicture</a> forces <i>fOwn</i> to <b>TRUE</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-get_handle#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_Handle(winmdroot.System.Ole.OLE_HANDLE* pHandle)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IPicture*)Unsafe.AsPointer(ref this), pHandle);
			}

			/// <inheritdoc cref="get_hPal(winmdroot.System.Ole.OLE_HANDLE*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_hPal(out winmdroot.System.Ole.OLE_HANDLE phPal)
			{
				fixed (winmdroot.System.Ole.OLE_HANDLE* phPalLocal = &phPal)
				{
					winmdroot.Foundation.HRESULT __result = this.get_hPal(phPalLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves a copy of the palette currently used by the picture object.</summary>
			/// <param name="phPal">A pointer to a variable that receives the palette handle. The variable is set to <b>NULL</b> on failure.</param>
			/// <returns>
			/// <para>This method supports the standard return values E_FAIL and E_OUTOFMEMORY, 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> If the picture object has ownership of the picture, it also has ownership of the palette and will destroy it when the object is itself destroyed. Otherwise the caller owns the palette. The <i>fOwn</i> parameter to <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-olecreatepictureindirect">OleCreatePictureIndirect</a> determines ownership. <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-oleloadpicture">OleLoadPicture</a> sets <i>fOwn</i> to <b>TRUE</b> to indicate that the picture object owns the palette.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-get_hpal#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_hPal(winmdroot.System.Ole.OLE_HANDLE* phPal)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IPicture*)Unsafe.AsPointer(ref this), phPal);
			}

			/// <inheritdoc cref="get_Type(winmdroot.System.Ole.PICTYPE*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_Type(out winmdroot.System.Ole.PICTYPE pType)
			{
				fixed (winmdroot.System.Ole.PICTYPE* pTypeLocal = &pType)
				{
					winmdroot.Foundation.HRESULT __result = this.get_Type(pTypeLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the current type of the picture contained in the picture object.</summary>
			/// <param name="pType">Pointer to a variable that receives the picture type. The Type property can have any one of the values contained in the <a href="https://docs.microsoft.com/windows/desktop/com/pictype-constants">PICTYPE</a> enumeration.</param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, 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-ipicture-get_type">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_Type(winmdroot.System.Ole.PICTYPE* pType)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.PICTYPE* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IPicture*)Unsafe.AsPointer(ref this), pType);
			}

			/// <inheritdoc cref="get_Width(int*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_Width(out int pWidth)
			{
				fixed (int* pWidthLocal = &pWidth)
				{
					winmdroot.Foundation.HRESULT __result = this.get_Width(pWidthLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the current width of the picture in the picture object.</summary>
			/// <param name="pWidth">A pointer to a variable that receives the width.</param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, 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-ipicture-get_width">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_Width(int* pWidth)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IPicture*)Unsafe.AsPointer(ref this), pWidth);
			}

			/// <inheritdoc cref="get_Height(int*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_Height(out int pHeight)
			{
				fixed (int* pHeightLocal = &pHeight)
				{
					winmdroot.Foundation.HRESULT __result = this.get_Height(pHeightLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the current height of the picture in the picture object.</summary>
			/// <param name="pHeight">A pointer to a variable that receives the height.</param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, 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-ipicture-get_height">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_Height(int* pHeight)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IPicture*)Unsafe.AsPointer(ref this), pHeight);
			}

			/// <inheritdoc cref="Render(winmdroot.Graphics.Gdi.HDC, int, int, int, int, int, int, int, int, winmdroot.Foundation.RECT*)"/>
			internal unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, in winmdroot.Foundation.RECT pRcWBounds)
			{
				fixed (winmdroot.Foundation.RECT* pRcWBoundsLocal = &pRcWBounds)
				{
					winmdroot.Foundation.HRESULT __result = this.Render(hDC, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, pRcWBoundsLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT Render(IPicture* pThis, winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.Render(hDC, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, pRcWBounds);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Renders (draws) a specified portion of the picture defined by the offset (xSrc,ySrc) of the source picture and the dimensions to copy (cxSrc,xySrc).</summary>
			/// <param name="hDC">A handle of the device context on which to render the image.</param>
			/// <param name="x">The horizontal coordinate in <i>hdc</i> at which to place the rendered image.</param>
			/// <param name="y">The vertical coordinate in <i>hdc</i> at which to place the rendered image.</param>
			/// <param name="cx">The horizontal dimension (width) of the destination rectangle.</param>
			/// <param name="cy">The vertical dimension (height) of the destination rectangle</param>
			/// <param name="xSrc">The horizontal offset in the source picture from which to start copying.</param>
			/// <param name="ySrc">The vertical offset in the source picture from which to start copying.</param>
			/// <param name="cxSrc">The horizontal extent to copy from the source picture.</param>
			/// <param name="cySrc">The vertical extent to copy from the source picture.</param>
			/// <param name="pRcWBounds">A pointer to a rectangle containing the position of the destination within a metafile device context if <i>hdc</i> is a metafile DC. Cannot be <b>NULL</b> in such cases.</param>
			/// <returns>
			/// <para>This method supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as well as the following: </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-render">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,int ,int ,int ,int ,int ,int ,int ,int ,winmdroot.Foundation.RECT* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IPicture*)Unsafe.AsPointer(ref this), hDC, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, pRcWBounds);
			}

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

			/// <summary>Assigns a GDI palette to the picture contained in the picture object.</summary>
			/// <param name="hPal">A handle to the GDI palette assigned to the picture.</param>
			/// <returns>This method supports the standard return values E_FAIL, E_INVALIDARG, E_OUTOFMEMORY, and S_OK.</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> Ownership of the palette passed to this method depends on how the picture object was created, as specified by the <i>fOwn</i> parameter to <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-olecreatepictureindirect">OleCreatePictureIndirect</a>. <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-oleloadpicture">OleLoadPicture</a> forces <i>fOwn</i> to <b>TRUE</b>; if the object owns the picture, then it takes over ownership of this palette.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-set_hpal#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public winmdroot.Foundation.HRESULT set_hPal(winmdroot.System.Ole.OLE_HANDLE hPal)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IPicture*)Unsafe.AsPointer(ref this), hPal);
			}

			/// <inheritdoc cref="get_CurDC(winmdroot.Graphics.Gdi.HDC*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_CurDC(out winmdroot.Graphics.Gdi.HDC phDC)
			{
				fixed (winmdroot.Graphics.Gdi.HDC* phDCLocal = &phDC)
				{
					winmdroot.Foundation.HRESULT __result = this.get_CurDC(phDCLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the handle of the current device context. This property is valid only for bitmap pictures.</summary>
			/// <param name="phDC">A pointer a variable that receives the device context.</param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, as well as the following values. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>The CurDC property and the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-ipicture-selectpicture">IPicture::SelectPicture</a> method exist to circumvent restrictions in Windows; specifically, that an object can only be selected into exactly one device context at a time. In some cases, a picture object may be permanently selected into a particular device context (for example, a control may use a certain picture for a background). To use this picture property elsewhere, it must be temporarily deselected from its old device context, selected into the new device context for the operation, then reselected back into the old device context. The <b>IPicture::get_CurDC</b> method returns the device context handle into which the picture is currently selected. The <b>IPicture::SelectPicture</b> method selects the picture into a new device context, returning the old device context and the picture's GDI handle. The caller should select the picture back into the old device context when the caller is done with it, as is normal for Windows code. <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 always owns any device contexts passed between it and the picture object. Because the picture object maintains a copy of the HDC, the caller should use a memory device context (created with the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createcompatibledc">CreateCompatibleDC</a> function) and not a screen device context (from <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getdc">GetDC</a>, <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createdca">CreateDC</a>, or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a>), because the screen device contexts are a limited system resource.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-get_curdc#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.HDC* phDC)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IPicture*)Unsafe.AsPointer(ref this), phDC);
			}

			/// <inheritdoc cref="SelectPicture(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.HDC*, winmdroot.System.Ole.OLE_HANDLE*)"/>
			internal unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, out winmdroot.Graphics.Gdi.HDC phDCOut, out winmdroot.System.Ole.OLE_HANDLE phBmpOut)
			{
				fixed (winmdroot.System.Ole.OLE_HANDLE* phBmpOutLocal = &phBmpOut)
				{
					fixed (winmdroot.Graphics.Gdi.HDC* phDCOutLocal = &phDCOut)
					{
						winmdroot.Foundation.HRESULT __result = this.SelectPicture(hDCIn, phDCOutLocal, phBmpOutLocal);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT SelectPicture(IPicture* pThis, winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.SelectPicture(hDCIn, phDCOut, phBmpOut);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Selects a bitmap picture into a given device context, and returns the device context in which the picture was previously selected as well as the picture's GDI handle. This method works in conjunction with IPicture::get_CurDC.</summary>
			/// <param name="hDCIn">A handle for the device context in which to select the picture.</param>
			/// <param name="phDCOut">A pointer to a variable that receives the previous device context. This parameter can be <b>NULL</b> if the caller does not need this information. Ownership of the device context is always the responsibility of the caller.</param>
			/// <param name="phBmpOut">A pointer to a variable that receives the GDI handle of the picture. This parameter can be <b>NULL</b> if the caller does not need the handle. Ownership of this handle is determined by the <i>fOwn</i> parameter passed to <a href="https://docs.microsoft.com/windows/desktop/api/olectl/nf-olectl-olecreatepictureindirect">OleCreatePictureIndirect</a>. Pictures loaded from a stream always own their resources.</param>
			/// <returns>This method supports the standard return values E_FAIL, E_INVALIDARG, E_OUTOFMEMORY, and S_OK.</returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-selectpicture">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC* ,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IPicture*)Unsafe.AsPointer(ref this), hDCIn, phDCOut, phBmpOut);
			}

			/// <inheritdoc cref="get_KeepOriginalFormat(winmdroot.Foundation.BOOL*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_KeepOriginalFormat(out winmdroot.Foundation.BOOL pKeep)
			{
				fixed (winmdroot.Foundation.BOOL* pKeepLocal = &pKeep)
				{
					winmdroot.Foundation.HRESULT __result = this.get_KeepOriginalFormat(pKeepLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the current value of the picture's KeepOriginalFormat property.</summary>
			/// <param name="pKeep">A pointer to a variable that receives the value of the property.</param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, as well as the following value. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-get_keeporiginalformat">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_KeepOriginalFormat(winmdroot.Foundation.BOOL* pKeep)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Foundation.BOOL* ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((IPicture*)Unsafe.AsPointer(ref this), pKeep);
			}

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

			/// <summary>Sets the value of the picture's KeepOriginalFormat property.</summary>
			/// <param name="keep">Specifies the new value to assign to the property.</param>
			/// <returns>This method returns S_OK on success and E_FAIL otherwise.</returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-put_keeporiginalformat">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public winmdroot.Foundation.HRESULT put_KeepOriginalFormat(winmdroot.Foundation.BOOL keep)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((IPicture*)Unsafe.AsPointer(ref this), keep);
			}

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

			/// <summary>Notifies the picture object that its picture resource has changed. This method only calls IPropertyNotifySink::OnChanged with DISPID_PICT_HANDLE for any connected sinks.</summary>
			/// <returns>This method S_OK if it succeeds and E_FAIL if the picture object is uninitialized.</returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-picturechanged">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public winmdroot.Foundation.HRESULT PictureChanged()
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Foundation.HRESULT>)lpVtbl[14])((IPicture*)Unsafe.AsPointer(ref this));
			}

			/// <inheritdoc cref="SaveAsFile(winmdroot.System.Com.IStream*, winmdroot.Foundation.BOOL, int*)"/>
			internal unsafe winmdroot.Foundation.HRESULT SaveAsFile(winmdroot.System.Com.IStream* pStream, winmdroot.Foundation.BOOL fSaveMemCopy, out int pCbSize)
			{
				fixed (int* pCbSizeLocal = &pCbSize)
				{
					winmdroot.Foundation.HRESULT __result = this.SaveAsFile(pStream, fSaveMemCopy, pCbSizeLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT SaveAsFile(IPicture* pThis, winmdroot.System.Com.IStream* pStream, winmdroot.Foundation.BOOL fSaveMemCopy, int* pCbSize)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.SaveAsFile(pStream, fSaveMemCopy, pCbSize);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Saves the picture's data into a stream in the same format that it would save itself into a file. Bitmaps use the BMP file format, metafiles the WMF format, and icons the ICO format.</summary>
			/// <param name="pStream">A pointer to the stream into which the picture writes its data.</param>
			/// <param name="fSaveMemCopy">A flag indicating whether to save a copy of the picture in memory.</param>
			/// <param name="pCbSize">Pointer to a variable that receives the number of bytes written into the stream. This value can be <b>NULL</b>, indicating that the caller does not require this information.</param>
			/// <returns>This method supports the standard return values E_FAIL, E_INVALIDARG, and S_OK.</returns>
			/// <remarks>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-saveasfile">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT SaveAsFile(winmdroot.System.Com.IStream* pStream, winmdroot.Foundation.BOOL fSaveMemCopy, int* pCbSize)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Com.IStream* ,winmdroot.Foundation.BOOL ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((IPicture*)Unsafe.AsPointer(ref this), pStream, fSaveMemCopy, pCbSize);
			}

			/// <inheritdoc cref="get_Attributes(uint*)"/>
			internal unsafe winmdroot.Foundation.HRESULT get_Attributes(out uint pDwAttr)
			{
				fixed (uint* pDwAttrLocal = &pDwAttr)
				{
					winmdroot.Foundation.HRESULT __result = this.get_Attributes(pDwAttrLocal);
					return __result;
				}
			}

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

			/// <summary>Retrieves the current set of the picture's bit attributes.</summary>
			/// <param name="pDwAttr">
			/// <para>A pointer to a variable that receives the value of the Attributes property. The Attributes property can contain any combination of the values from the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ne-ocidl-pictureattributes">PICTUREATTRIBUTES</a> enumeration.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ipicture-get_attributes#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>This method supports the standard return value E_FAIL, 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-ipicture-get_attributes">Learn more about this API from docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT get_Attributes(uint* pDwAttr)
			{
				return ((delegate *unmanaged [Stdcall]<IPicture*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[16])((IPicture*)Unsafe.AsPointer(ref this), pDwAttr);
			}

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

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

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

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT> get_Handle_4;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT> get_hPal_5;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.PICTYPE* ,winmdroot.Foundation.HRESULT> get_Type_6;

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

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

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,int ,int ,int ,int ,int ,int ,int ,int ,winmdroot.Foundation.RECT* ,winmdroot.Foundation.HRESULT> Render_9;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Ole.OLE_HANDLE ,winmdroot.Foundation.HRESULT> set_hPal_10;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC* ,winmdroot.Foundation.HRESULT> get_CurDC_11;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Graphics.Gdi.HDC ,winmdroot.Graphics.Gdi.HDC* ,winmdroot.System.Ole.OLE_HANDLE* ,winmdroot.Foundation.HRESULT> SelectPicture_12;

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

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

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.Foundation.HRESULT> PictureChanged_15;

				internal delegate *unmanaged [Stdcall]<IPicture*,winmdroot.System.Com.IStream* ,winmdroot.Foundation.BOOL ,int* ,winmdroot.Foundation.HRESULT> SaveAsFile_16;

				internal delegate *unmanaged [Stdcall]<IPicture*,uint* ,winmdroot.Foundation.HRESULT> get_Attributes_17;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->get_Handle_4 = &get_Handle;
				vtable->get_hPal_5 = &get_hPal;
				vtable->get_Type_6 = &get_Type;
				vtable->get_Width_7 = &get_Width;
				vtable->get_Height_8 = &get_Height;
				vtable->Render_9 = &Render;
				vtable->set_hPal_10 = &set_hPal;
				vtable->get_CurDC_11 = &get_CurDC;
				vtable->SelectPicture_12 = &SelectPicture;
				vtable->get_KeepOriginalFormat_13 = &get_KeepOriginalFormat;
				vtable->put_KeepOriginalFormat_14 = &put_KeepOriginalFormat;
				vtable->PictureChanged_15 = &PictureChanged;
				vtable->SaveAsFile_16 = &SaveAsFile;
				vtable->get_Attributes_17 = &get_Attributes;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{7bf80980-bf32-101a-8bbb-00aa00300cab}</value>
			internal static readonly Guid IID_Guid = new Guid(0x7BF80980, 0xBF32, 0x101A, 0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0x80,0x09,0xF8,0x7B,0x32,0xBF,0x1A,0x10,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("7BF80980-BF32-101A-8BBB-00AA00300CAB"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.0")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_Handle(winmdroot.System.Ole.OLE_HANDLE* pHandle);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_hPal(winmdroot.System.Ole.OLE_HANDLE* phPal);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_Type(winmdroot.System.Ole.PICTYPE* pType);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_Width(int* pWidth);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_Height(int* pHeight);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT Render(winmdroot.Graphics.Gdi.HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, winmdroot.Foundation.RECT* pRcWBounds);

								[PreserveSig()]
winmdroot.Foundation.HRESULT set_hPal(winmdroot.System.Ole.OLE_HANDLE hPal);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_CurDC(winmdroot.Graphics.Gdi.HDC* phDC);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT SelectPicture(winmdroot.Graphics.Gdi.HDC hDCIn, winmdroot.Graphics.Gdi.HDC* phDCOut, winmdroot.System.Ole.OLE_HANDLE* phBmpOut);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_KeepOriginalFormat(winmdroot.Foundation.BOOL* pKeep);

								[PreserveSig()]
winmdroot.Foundation.HRESULT put_KeepOriginalFormat(winmdroot.Foundation.BOOL keep);

								[PreserveSig()]
winmdroot.Foundation.HRESULT PictureChanged();

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT SaveAsFile(winmdroot.System.Com.IStream* pStream, winmdroot.Foundation.BOOL fSaveMemCopy, int* pCbSize);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT get_Attributes(uint* pDwAttr);
			}
		}
	}
}