// ------------------------------------------------------------------------------ // <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("79EAC9C0-BAF9-11CE-8C82-00AA004BA90B")] [CLSCompliant(false)] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IBinding :winmdroot.IVTable<IBinding,IBinding.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]<IBinding*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IBinding*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IBinding*,uint>)lpVtbl[1])((IBinding*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IBinding*,uint>)lpVtbl[2])((IBinding*)Unsafe.AsPointer(ref this)); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Abort(IBinding* pThis) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Abort(); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public void Abort() { ((delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IBinding*)Unsafe.AsPointer(ref this)).ThrowOnFailure(); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Suspend(IBinding* pThis) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Suspend(); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public void Suspend() { ((delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IBinding*)Unsafe.AsPointer(ref this)).ThrowOnFailure(); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Resume(IBinding* pThis) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Resume(); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public void Resume() { ((delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IBinding*)Unsafe.AsPointer(ref this)).ThrowOnFailure(); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT SetPriority(IBinding* pThis, int nPriority) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.SetPriority(nPriority); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public void SetPriority(int nPriority) { ((delegate *unmanaged [Stdcall]<IBinding*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IBinding*)Unsafe.AsPointer(ref this), nPriority).ThrowOnFailure(); } /// <inheritdoc cref="GetPriority(int*)"/> [OverloadResolutionPriority(1)] internal unsafe void GetPriority(out int pnPriority) { fixed (int* pnPriorityLocal = &pnPriority) { this.GetPriority(pnPriorityLocal); } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetPriority(IBinding* pThis, int* pnPriority) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetPriority(pnPriority); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public unsafe void GetPriority(int* pnPriority) { ((delegate *unmanaged [Stdcall]<IBinding*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IBinding*)Unsafe.AsPointer(ref this), pnPriority).ThrowOnFailure(); } /// <inheritdoc cref="GetBindResult(global::System.Guid*, uint*, winmdroot.Foundation.PWSTR*, uint*)"/> [OverloadResolutionPriority(1)] internal unsafe void GetBindResult(out global::System.Guid pclsidProtocol, out uint pdwResult, out winmdroot.Foundation.PWSTR pszResult, ref uint pdwReserved) { fixed (uint* pdwReservedLocal = &pdwReserved) { fixed (winmdroot.Foundation.PWSTR* pszResultLocal = &pszResult) { fixed (uint* pdwResultLocal = &pdwResult) { fixed (global::System.Guid* pclsidProtocolLocal = &pclsidProtocol) { this.GetBindResult(pclsidProtocolLocal, pdwResultLocal, pszResultLocal, pdwReservedLocal); } } } } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetBindResult(IBinding* pThis, global::System.Guid* pclsidProtocol, uint* pdwResult, winmdroot.Foundation.PWSTR* pszResult, uint* pdwReserved) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetBindResult(pclsidProtocol, pdwResult, pszResult, pdwReserved); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } public unsafe void GetBindResult(global::System.Guid* pclsidProtocol, uint* pdwResult, winmdroot.Foundation.PWSTR* pszResult, uint* pdwReserved) { ((delegate *unmanaged [Stdcall]<IBinding*,global::System.Guid* ,uint* ,winmdroot.Foundation.PWSTR* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IBinding*)Unsafe.AsPointer(ref this), pclsidProtocol, pdwResult, pszResult, pdwReserved).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]<IBinding*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IBinding*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IBinding*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT> Abort_4; internal delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT> Suspend_5; internal delegate *unmanaged [Stdcall]<IBinding*,winmdroot.Foundation.HRESULT> Resume_6; internal delegate *unmanaged [Stdcall]<IBinding*,int ,winmdroot.Foundation.HRESULT> SetPriority_7; internal delegate *unmanaged [Stdcall]<IBinding*,int* ,winmdroot.Foundation.HRESULT> GetPriority_8; internal delegate *unmanaged [Stdcall]<IBinding*,global::System.Guid* ,uint* ,winmdroot.Foundation.PWSTR* ,uint* ,winmdroot.Foundation.HRESULT> GetBindResult_9; } public static void PopulateVTable(Vtbl* vtable) { vtable->Abort_4 = &Abort; vtable->Suspend_5 = &Suspend; vtable->Resume_6 = &Resume; vtable->SetPriority_7 = &SetPriority; vtable->GetPriority_8 = &GetPriority; vtable->GetBindResult_9 = &GetBindResult; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{79eac9c0-baf9-11ce-8c82-00aa004ba90b}</value> internal static readonly Guid IID_Guid = new Guid(0x79EAC9C0, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0xC0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("79EAC9C0-BAF9-11CE-8C82-00AA004BA90B"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] internal interface Interface { [PreserveSig()] winmdroot.Foundation.HRESULT Abort(); [PreserveSig()] winmdroot.Foundation.HRESULT Suspend(); [PreserveSig()] winmdroot.Foundation.HRESULT Resume(); [PreserveSig()] winmdroot.Foundation.HRESULT SetPriority(int nPriority); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetPriority(int* pnPriority); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetBindResult(global::System.Guid* pclsidProtocol, uint* pdwResult, winmdroot.Foundation.PWSTR* pszResult, uint* pdwReserved); } } } }