// ------------------------------------------------------------------------------ // <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("B196B28B-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 ISpecifyPropertyPages :winmdroot.IVTable<ISpecifyPropertyPages,ISpecifyPropertyPages.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]<ISpecifyPropertyPages*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ISpecifyPropertyPages*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,uint>)lpVtbl[1])((ISpecifyPropertyPages*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,uint>)lpVtbl[2])((ISpecifyPropertyPages*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="GetPages(winmdroot.System.Ole.CAUUID*)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT GetPages(out winmdroot.System.Ole.CAUUID pPages) { fixed (winmdroot.System.Ole.CAUUID* pPagesLocal = &pPages) { winmdroot.Foundation.HRESULT __result = this.GetPages(pPagesLocal); return __result; } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetPages(ISpecifyPropertyPages* pThis, winmdroot.System.Ole.CAUUID* pPages) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetPages(pPages); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves a list of property pages that can be displayed in this object's property sheet.</summary> /// <param name="pPages">A pointer to a caller-allocated <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-cauuid">CAUUID</a> structure that must be initialized and filled before returning. The <b>pElems</b> member in the structure is allocated by the callee with <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cotaskmemalloc">CoTaskMemAlloc</a> and freed by the caller with <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cotaskmemfree">CoTaskMemFree</a>.</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>The <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-cauuid">CAUUID</a> structure is caller-allocated, but is not initialized by the caller. The <b>GetPages</b> method fills the <b>cElements</b> member in the structure. This method also allocates memory for the array pointed to by the <b>pElems</b> member using <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cotaskmemalloc">CoTaskMemAlloc</a>. Then, it fills the newly allocated array. After this method returns successfully, the structure contains a counted array of UUIDs, each UUID specifying a property page CLSID. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> The caller must release the memory pointed to by the <b>pElems</b> member of <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-cauuid">CAUUID</a>, using <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cotaskmemfree">CoTaskMemFree</a> when it is no longer needed. <h3><a id="Notes_to_Implementers"></a><a id="notes_to_implementers"></a><a id="NOTES_TO_IMPLEMENTERS"></a>Notes to Implementers</h3> E_NOTIMPL is not allowed as a return value, because an object with no property pages should not expose the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nn-ocidl-ispecifypropertypages">ISpecifyPropertyPages</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-ispecifypropertypages-getpages#">Read more on learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.Foundation.HRESULT GetPages(winmdroot.System.Ole.CAUUID* pPages) { return ((delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,winmdroot.System.Ole.CAUUID* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ISpecifyPropertyPages*)Unsafe.AsPointer(ref this), pPages); } 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]<ISpecifyPropertyPages*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,uint> Release_3; internal delegate *unmanaged [Stdcall]<ISpecifyPropertyPages*,winmdroot.System.Ole.CAUUID* ,winmdroot.Foundation.HRESULT> GetPages_4; } public static void PopulateVTable(Vtbl* vtable) { vtable->GetPages_4 = &GetPages; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{b196b28b-bab4-101a-b69c-00aa00341d07}</value> internal static readonly Guid IID_Guid = new Guid(0xB196B28B, 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[] { 0x8B,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("B196B28B-BAB4-101A-B69C-00AA00341D07"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.0")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetPages(winmdroot.System.Ole.CAUUID* pPages); } } } }