// ------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> // ------------------------------------------------------------------------------ #pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981,SYSLIB1092,CS3021,CS3019 using global::System; using global::System.Diagnostics; using global::System.Diagnostics.CodeAnalysis; using global::System.Runtime.CompilerServices; using global::System.Runtime.InteropServices; using global::System.Runtime.Versioning; using winmdroot = global::Windows.Win32; namespace Windows.Win32 { namespace System.Ole { [Guid("8A701DA0-4FEB-101B-A82E-08002B2B2337")] [CLSCompliant(false)] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IGetOleObject :winmdroot.IVTable<IGetOleObject,IGetOleObject.Vtbl>,IComIID { /// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject) { fixed (void** ppvObjectLocal = &ppvObject) { fixed (global::System.Guid* riidLocal = &riid) { winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal); return __result; } } } public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject) { return ((delegate *unmanaged [Stdcall]<IGetOleObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IGetOleObject*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IGetOleObject*,uint>)lpVtbl[1])((IGetOleObject*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IGetOleObject*,uint>)lpVtbl[2])((IGetOleObject*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="GetOleObject(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT GetOleObject(in global::System.Guid riid, ref void* ppvObj) { fixed (void** ppvObjLocal = &ppvObj) { fixed (global::System.Guid* riidLocal = &riid) { winmdroot.Foundation.HRESULT __result = this.GetOleObject(riidLocal, ppvObjLocal); return __result; } } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetOleObject(IGetOleObject* pThis, global::System.Guid* riid, void** ppvObj) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetOleObject(riid, ppvObj); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Gets a pointer to an OLE control on a Visual Basic container.</summary> /// <param name="riid"> /// <para>Specifies the interface to retrieve. Pass <b>IID_IOleObject</b> to obtain a pointer to the control.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/vbinterf/nf-vbinterf-igetoleobject-getoleobject#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="ppvObj">Pointer to the control.</param> /// <returns> /// <para>This method supports the standard return values <b>E_INVALIDARG</b>, <b>E_OUTOFMEMORY</b>, and <b>E_UNEXPECTED</b>, as well as the following:</para> /// </returns> /// <remarks> /// <para><see href="https://learn.microsoft.com/windows/win32/api/vbinterf/nf-vbinterf-igetoleobject-getoleobject">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.Foundation.HRESULT GetOleObject(global::System.Guid* riid, void** ppvObj) { return ((delegate *unmanaged [Stdcall]<IGetOleObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IGetOleObject*)Unsafe.AsPointer(ref this), riid, ppvObj); } internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv) where T : unmanaged { Guid guid = typeof(T).GUID; void* pv; var hr = this.QueryInterface(&guid, &pv); if (hr.Succeeded) { ppv = (T*)pv; } else { ppv = null; } return hr; } internal struct Vtbl { internal delegate *unmanaged [Stdcall]<IGetOleObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IGetOleObject*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IGetOleObject*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IGetOleObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> GetOleObject_4; } public static void PopulateVTable(Vtbl* vtable) { vtable->GetOleObject_4 = &GetOleObject; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{8a701da0-4feb-101b-a82e-08002b2b2337}</value> internal static readonly Guid IID_Guid = new Guid(0x8A701DA0, 0x4FEB, 0x101B, 0xA8, 0x2E, 0x08, 0x00, 0x2B, 0x2B, 0x23, 0x37); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0xA0,0x1D,0x70,0x8A,0xEB,0x4F,0x1B,0x10,0xA8,0x2E,0x08,0x00,0x2B,0x2B,0x23,0x37 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("8A701DA0-4FEB-101B-A82E-08002B2B2337"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetOleObject(global::System.Guid* riid, void** ppvObj); } } } }