// ------------------------------------------------------------------------------ // <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("B196B283-BAB4-101A-B69C-00AA00341D07")] [CLSCompliant(false)] [SupportedOSPlatform("windows5.0")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IProvideClassInfo :winmdroot.IVTable<IProvideClassInfo,IProvideClassInfo.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]<IProvideClassInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IProvideClassInfo*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IProvideClassInfo*,uint>)lpVtbl[1])((IProvideClassInfo*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IProvideClassInfo*,uint>)lpVtbl[2])((IProvideClassInfo*)Unsafe.AsPointer(ref this)); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetClassInfo(IProvideClassInfo* pThis, winmdroot.System.Com.ITypeInfo** ppTI) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetClassInfo(ppTI); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves a pointer to the ITypeInfo interface for the object's type information. The type information for an object corresponds to the object's coclass entry in a type library.</summary> /// <param name="ppTI">A pointer to an <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-itypeinfo">ITypeInfo</a> pointer variable that receives the interface pointer to the object's type information. The caller is responsible for calling <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">Release</a> on the returned interface pointer if this method returns successfully.</param> /// <returns> /// <para>This method can return the standard return values E_OUTOFMEMORY and E_UNEXPECTED, 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> This method must call <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-addref">AddRef</a> before returning. If the object loads the type information from a type library, the type library itself will call <b>AddRef</b> in creating the pointer. Because the caller cannot specify a locale identifier (LCID) when calling this method, this method must assume the neutral language, that is, LANGID_NEUTRAL, and use this value to determine what locale-specific type information to return. This method must be implemented; E_NOTIMPL is not an acceptable return value.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-iprovideclassinfo-getclassinfo#">Read more on learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.Foundation.HRESULT GetClassInfo(winmdroot.System.Com.ITypeInfo** ppTI) { return ((delegate *unmanaged [Stdcall]<IProvideClassInfo*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IProvideClassInfo*)Unsafe.AsPointer(ref this), ppTI); } 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]<IProvideClassInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IProvideClassInfo*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IProvideClassInfo*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IProvideClassInfo*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetClassInfo_4; } public static void PopulateVTable(Vtbl* vtable) { vtable->GetClassInfo_4 = &GetClassInfo; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{b196b283-bab4-101a-b69c-00aa00341d07}</value> internal static readonly Guid IID_Guid = new Guid(0xB196B283, 0xBAB4, 0x101A, 0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0x83,0xB2,0x96,0xB1,0xB4,0xBA,0x1A,0x10,0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("B196B283-BAB4-101A-B69C-00AA00341D07"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.0")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetClassInfo(winmdroot.System.Com.ITypeInfo** ppTI); } } } }