|
// ------------------------------------------------------------------------------
// <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
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 UI.Shell
{
[Guid("70629033-E363-4A28-A567-0DB78006E6D7")]
[SupportedOSPlatform("windows6.0.6000")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IEnumShellItems
:IVTable<IEnumShellItems,IEnumShellItems.Vtbl>,IComIID {
/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
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]<IEnumShellItems*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IEnumShellItems*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IEnumShellItems*,uint>)lpVtbl[1])((IEnumShellItems*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IEnumShellItems*,uint>)lpVtbl[2])((IEnumShellItems*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Next(IEnumShellItems* pThis, uint celt, winmdroot.UI.Shell.IShellItem** rgelt, [Optional] uint* pceltFetched)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Next(celt, rgelt, pceltFetched);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets an array of one or more IShellItem interfaces from the enumeration.</summary>
/// <param name="celt">
/// <para>Type: <b>ULONG</b> The number of elements in the array referenced by the <i>rgelt</i> parameter.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-next#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="rgelt">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a>**</b> The address of an array of pointers to <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a> interfaces that receive the enumerated item or items. The calling application is responsible for freeing the <b>IShellItem</b> interfaces by calling the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">IUnknown::Release</a> method.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-next#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pceltFetched">
/// <para>Type: <b>ULONG*</b> A pointer to a value that receives the number of <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a> interfaces successfully retrieved. The count can be smaller than the value specified in the <i>celt</i> parameter. This parameter can be <b>NULL</b> on entry only if <i>celt</i> is one, because in that case the method can only retrieve one item and return <b>S_OK</b>, or zero items and return <b>S_FALSE</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-next#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-next">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Next(uint celt, winmdroot.UI.Shell.IShellItem** rgelt, [Optional] uint* pceltFetched)
{
((delegate *unmanaged [Stdcall]<IEnumShellItems*,uint ,winmdroot.UI.Shell.IShellItem** ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IEnumShellItems*)Unsafe.AsPointer(ref this), celt, rgelt, pceltFetched).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Skip(IEnumShellItems* pThis, uint celt)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Skip(celt);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Skips a given number of IShellItem interfaces in the enumeration. Used when retrieving interfaces.</summary>
/// <param name="celt">
/// <para>Type: <b>ULONG</b> The number of <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a> interfaces to skip.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-skip#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-skip">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public void Skip(uint celt)
{
((delegate *unmanaged [Stdcall]<IEnumShellItems*,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IEnumShellItems*)Unsafe.AsPointer(ref this), celt).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Reset(IEnumShellItems* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Reset();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Resets the internal count of retrieved IShellItem interfaces in the enumeration.</summary>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-reset">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public void Reset()
{
((delegate *unmanaged [Stdcall]<IEnumShellItems*,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IEnumShellItems*)Unsafe.AsPointer(ref this)).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Clone(IEnumShellItems* pThis, winmdroot.UI.Shell.IEnumShellItems** ppenum)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Clone(ppenum);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets a copy of the current enumeration.</summary>
/// <param name="ppenum">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumshellitems">IEnumShellItems</a>**</b> The address of a pointer that receives a copy of this enumeration.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-clone#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ienumshellitems-clone">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Clone(winmdroot.UI.Shell.IEnumShellItems** ppenum)
{
((delegate *unmanaged [Stdcall]<IEnumShellItems*,winmdroot.UI.Shell.IEnumShellItems** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IEnumShellItems*)Unsafe.AsPointer(ref this), ppenum).ThrowOnFailure();
}
internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged
{
var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
if (hr.Succeeded)
{
ppv = (T*)pv;
}
else
{
ppv = null;
}
return hr;
}
internal struct Vtbl
{
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,uint ,winmdroot.UI.Shell.IShellItem** ,uint* ,winmdroot.Foundation.HRESULT> Next_4;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,uint ,winmdroot.Foundation.HRESULT> Skip_5;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,winmdroot.Foundation.HRESULT> Reset_6;
internal delegate *unmanaged [Stdcall]<IEnumShellItems*,winmdroot.UI.Shell.IEnumShellItems** ,winmdroot.Foundation.HRESULT> Clone_7;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->Next_4 = &Next;
vtable->Skip_5 = &Skip;
vtable->Reset_6 = &Reset;
vtable->Clone_7 = &Clone;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{70629033-e363-4a28-a567-0db78006e6d7}</value>
internal static readonly Guid IID_Guid = new Guid(0x70629033, 0xE363, 0x4A28, 0xA5, 0x67, 0x0D, 0xB7, 0x80, 0x06, 0xE6, 0xD7);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x33,0x90,0x62,0x70,0x63,0xE3,0x28,0x4A,0xA5,0x67,0x0D,0xB7,0x80,0x06,0xE6,0xD7 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("70629033-E363-4A28-A567-0DB78006E6D7"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows6.0.6000")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Next(uint celt, winmdroot.UI.Shell.IShellItem** rgelt, [Optional] uint* pceltFetched);
[PreserveSig()]
winmdroot.Foundation.HRESULT Skip(uint celt);
[PreserveSig()]
winmdroot.Foundation.HRESULT Reset();
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Clone(winmdroot.UI.Shell.IEnumShellItems** ppenum);
}
}
}
}
|