// ------------------------------------------------------------------------------ // <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("91733A60-3F4C-101B-A3F6-00AA0034E4E9")] [CLSCompliant(false)] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IGetVBAObject :winmdroot.IVTable<IGetVBAObject,IGetVBAObject.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]<IGetVBAObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IGetVBAObject*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IGetVBAObject*,uint>)lpVtbl[1])((IGetVBAObject*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IGetVBAObject*,uint>)lpVtbl[2])((IGetVBAObject*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="GetObject(global::System.Guid*, void**, uint)"/> [OverloadResolutionPriority(1)] internal unsafe void GetObject(in global::System.Guid riid, ref void* ppvObj, uint dwReserved) { fixed (void** ppvObjLocal = &ppvObj) { fixed (global::System.Guid* riidLocal = &riid) { this.GetObject(riidLocal, ppvObjLocal, dwReserved); } } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetObject(IGetVBAObject* pThis, global::System.Guid* riid, void** ppvObj, uint dwReserved) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetObject(riid, ppvObj, dwReserved); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Gets a pointer to an interface on the VBA object.</summary> /// <param name="riid"> /// <para>Specifies the interface to retrieve. Pass <b>IID_IVBFormat</b> to retrieve a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/vbinterf/nn-vbinterf-ivbformat">IVBFormat</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/vbinterf/nf-vbinterf-igetvbaobject-getobject#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="ppvObj">Pointer to the interface.</param> /// <param name="dwReserved">Reserved.</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-igetvbaobject-getobject">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe void GetObject(global::System.Guid* riid, void** ppvObj, uint dwReserved) { ((delegate *unmanaged [Stdcall]<IGetVBAObject*,global::System.Guid* ,void** ,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IGetVBAObject*)Unsafe.AsPointer(ref this), riid, ppvObj, dwReserved).ThrowOnFailure(); } 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]<IGetVBAObject*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IGetVBAObject*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IGetVBAObject*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IGetVBAObject*,global::System.Guid* ,void** ,uint ,winmdroot.Foundation.HRESULT> GetObject_4; } public static void PopulateVTable(Vtbl* vtable) { vtable->GetObject_4 = &GetObject; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{91733a60-3f4c-101b-a3f6-00aa0034e4e9}</value> internal static readonly Guid IID_Guid = new Guid(0x91733A60, 0x3F4C, 0x101B, 0xA3, 0xF6, 0x00, 0xAA, 0x00, 0x34, 0xE4, 0xE9); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0x60,0x3A,0x73,0x91,0x4C,0x3F,0x1B,0x10,0xA3,0xF6,0x00,0xAA,0x00,0x34,0xE4,0xE9 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("91733A60-3F4C-101B-A3F6-00AA0034E4E9"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetObject(global::System.Guid* riid, void** ppvObj, uint dwReserved); } } } }