// ------------------------------------------------------------------------------ // <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.Com { [Guid("6D5140C1-7436-11CE-8034-00AA006009FA")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IServiceProvider :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]<IServiceProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IServiceProvider*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IServiceProvider*,uint>)lpVtbl[1])((IServiceProvider*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IServiceProvider*,uint>)lpVtbl[2])((IServiceProvider*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="QueryService(global::System.Guid*, global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT QueryService(in global::System.Guid guidService, in global::System.Guid riid, out void* ppvObject) { fixed (void** ppvObjectLocal = &ppvObject) { fixed (global::System.Guid* riidLocal = &riid) { fixed (global::System.Guid* guidServiceLocal = &guidService) { winmdroot.Foundation.HRESULT __result = this.QueryService(guidServiceLocal, riidLocal, ppvObjectLocal); return __result; } } } } /// <summary>Acts as the factory method for any services exposed through an implementation of IServiceProvider. Accepts a CLSID parameter.</summary> /// <param name="guidService">The unique identifier of the service (an SID).</param> /// <param name="riid">The unique identifier of the interface that the caller wants to receive for the service.</param> /// <param name="ppvObject">The address of the caller-allocated variable to receive the interface pointer of the service on successful return from this function. The caller becomes responsible for calling [Release](../unknwn/nf-unknwn-iunknown-release.md) through this interface pointer when the service is no longer required.</param> /// <returns>S_OK on success.</returns> /// <remarks>**QueryService** creates or accesses the implementation of the service identified with guidService. In ppv, it returns the address of the interface that is specified by riid.</remarks> public unsafe winmdroot.Foundation.HRESULT QueryService(global::System.Guid* guidService, global::System.Guid* riid, void** ppvObject) { return ((delegate *unmanaged [Stdcall]<IServiceProvider*,global::System.Guid* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IServiceProvider*)Unsafe.AsPointer(ref this), guidService, riid, ppvObject); } 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]<IServiceProvider*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IServiceProvider*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IServiceProvider*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IServiceProvider*,global::System.Guid* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryService_4; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{6d5140c1-7436-11ce-8034-00aa006009fa}</value> internal static readonly Guid IID_Guid = new Guid(0x6D5140C1, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA); readonly ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => ref Unsafe.AsRef(in IID_Guid); } [Guid("6D5140C1-7436-11CE-8034-00AA006009FA"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT QueryService(global::System.Guid* guidService, global::System.Guid* riid, void** ppvObject); } } } }