File: Windows.Win32.IBindHost.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.Com
	{
		[Guid("FC4801A1-2BA9-11CF-A229-00AA003D7352")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IBindHost
			:IVTable<IBindHost,IBindHost.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]<IBindHost*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IBindHost*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

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

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

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT CreateMoniker(IBindHost* pThis, winmdroot.Foundation.PWSTR szName, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IMoniker** ppmk, uint dwReserved)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.CreateMoniker(szName, pBC, ppmk, dwReserved);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			public unsafe void CreateMoniker(winmdroot.Foundation.PWSTR szName, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IMoniker** ppmk, uint dwReserved)
			{
				((delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.Foundation.PWSTR ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IMoniker** ,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IBindHost*)Unsafe.AsPointer(ref this), szName, pBC, ppmk, dwReserved).ThrowOnFailure();
			}

			/// <inheritdoc cref="MonikerBindToStorage(winmdroot.System.Com.IMoniker*, winmdroot.System.Com.IBindCtx*, winmdroot.System.Com.IBindStatusCallback*, global::System.Guid*, void**)"/>
			internal unsafe void MonikerBindToStorage(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, in global::System.Guid riid, out void* ppvObj)
			{
				fixed (void** ppvObjLocal = &ppvObj)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						this.MonikerBindToStorage(pMk, pBC, pBSC, riidLocal, ppvObjLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT MonikerBindToStorage(IBindHost* pThis, winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.MonikerBindToStorage(pMk, pBC, pBSC, riid, ppvObj);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			public unsafe void MonikerBindToStorage(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj)
			{
				((delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.System.Com.IMoniker* ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IBindStatusCallback* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IBindHost*)Unsafe.AsPointer(ref this), pMk, pBC, pBSC, riid, ppvObj).ThrowOnFailure();
			}

			/// <inheritdoc cref="MonikerBindToObject(winmdroot.System.Com.IMoniker*, winmdroot.System.Com.IBindCtx*, winmdroot.System.Com.IBindStatusCallback*, global::System.Guid*, void**)"/>
			internal unsafe void MonikerBindToObject(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, in global::System.Guid riid, out void* ppvObj)
			{
				fixed (void** ppvObjLocal = &ppvObj)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						this.MonikerBindToObject(pMk, pBC, pBSC, riidLocal, ppvObjLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT MonikerBindToObject(IBindHost* pThis, winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.MonikerBindToObject(pMk, pBC, pBSC, riid, ppvObj);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			public unsafe void MonikerBindToObject(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj)
			{
				((delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.System.Com.IMoniker* ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IBindStatusCallback* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IBindHost*)Unsafe.AsPointer(ref this), pMk, pBC, pBSC, riid, ppvObj).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]<IBindHost*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

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

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

				internal delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.Foundation.PWSTR ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IMoniker** ,uint ,winmdroot.Foundation.HRESULT> CreateMoniker_4;

				internal delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.System.Com.IMoniker* ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IBindStatusCallback* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> MonikerBindToStorage_5;

				internal delegate *unmanaged [Stdcall]<IBindHost*,winmdroot.System.Com.IMoniker* ,winmdroot.System.Com.IBindCtx* ,winmdroot.System.Com.IBindStatusCallback* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> MonikerBindToObject_6;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->CreateMoniker_4 = &CreateMoniker;
				vtable->MonikerBindToStorage_5 = &MonikerBindToStorage;
				vtable->MonikerBindToObject_6 = &MonikerBindToObject;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{fc4801a1-2ba9-11cf-a229-00aa003d7352}</value>
			internal static readonly Guid IID_Guid = new Guid(0xFC4801A1, 0x2BA9, 0x11CF, 0xA2, 0x29, 0x00, 0xAA, 0x00, 0x3D, 0x73, 0x52);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0xA1,0x01,0x48,0xFC,0xA9,0x2B,0xCF,0x11,0xA2,0x29,0x00,0xAA,0x00,0x3D,0x73,0x52					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("FC4801A1-2BA9-11CF-A229-00AA003D7352"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT CreateMoniker(winmdroot.Foundation.PWSTR szName, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IMoniker** ppmk, uint dwReserved);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT MonikerBindToStorage(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT MonikerBindToObject(winmdroot.System.Com.IMoniker* pMk, winmdroot.System.Com.IBindCtx* pBC, winmdroot.System.Com.IBindStatusCallback* pBSC, global::System.Guid* riid, void** ppvObj);
			}
		}
	}
}