|
// ------------------------------------------------------------------------------
// <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("B63EA76D-1F85-456F-A19C-48159EFA858B")]
[SupportedOSPlatform("windows6.0.6000")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IShellItemArray
:IVTable<IShellItemArray,IShellItemArray.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]<IShellItemArray*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IShellItemArray*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IShellItemArray*,uint>)lpVtbl[1])((IShellItemArray*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IShellItemArray*,uint>)lpVtbl[2])((IShellItemArray*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="BindToHandler(winmdroot.System.Com.IBindCtx*, global::System.Guid*, global::System.Guid*, void**)"/>
internal unsafe void BindToHandler(winmdroot.System.Com.IBindCtx* pbc, in global::System.Guid bhid, in global::System.Guid riid, out void* ppvOut)
{
fixed (void** ppvOutLocal = &ppvOut)
{
fixed (global::System.Guid* riidLocal = &riid)
{
fixed (global::System.Guid* bhidLocal = &bhid)
{
this.BindToHandler(pbc, bhidLocal, riidLocal, ppvOutLocal);
}
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT BindToHandler(IShellItemArray* pThis, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* bhid, global::System.Guid* riid, void** ppvOut)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.BindToHandler(pbc, bhid, riid, ppvOut);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Binds to an object by means of the specified handler.</summary>
/// <param name="pbc">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ibindctx">IBindCtx</a>*</b> A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ibindctx">IBindCtx</a> interface on a bind context object.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-bindtohandler#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="bhid">Type: <b>REFGUID</b></param>
/// <param name="riid">
/// <para>Type: <b>REFIID</b> The IID of the object type to retrieve.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-bindtohandler#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ppvOut">
/// <para>Type: <b>void**</b> When this methods returns, contains the object specified in <i>riid</i> that is returned by the handler specified by <i>rbhid</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-bindtohandler#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-ishellitemarray-bindtohandler">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void BindToHandler(winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* bhid, global::System.Guid* riid, void** ppvOut)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IShellItemArray*)Unsafe.AsPointer(ref this), pbc, bhid, riid, ppvOut).ThrowOnFailure();
}
/// <inheritdoc cref="GetPropertyStore(winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS, global::System.Guid*, void**)"/>
internal unsafe void GetPropertyStore(winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS flags, in global::System.Guid riid, out void* ppv)
{
fixed (void** ppvLocal = &ppv)
{
fixed (global::System.Guid* riidLocal = &riid)
{
this.GetPropertyStore(flags, riidLocal, ppvLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPropertyStore(IShellItemArray* pThis, winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS flags, global::System.Guid* riid, void** ppv)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPropertyStore(flags, riid, ppv);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets a property store.</summary>
/// <param name="flags">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/propsys/ne-propsys-getpropertystoreflags">GETPROPERTYSTOREFLAGS</a></b> One of the <a href="https://docs.microsoft.com/windows/desktop/api/propsys/ne-propsys-getpropertystoreflags">GETPROPERTYSTOREFLAGS</a> constants.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertystore#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="riid">
/// <para>Type: <b>REFIID</b> The IID of the object type to retrieve.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertystore#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ppv">
/// <para>Type: <b>void**</b> When this method returns, contains interface pointer requested in riid. This is typically <a href="https://docs.microsoft.com/windows/desktop/api/propsys/nn-propsys-ipropertystore">IPropertyStore</a> or <a href="https://docs.microsoft.com/windows/desktop/api/propsys/nn-propsys-ipropertystorecapabilities">IPropertyStoreCapabilities</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertystore#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>This method is used to obtain a read-only property store that aggregates properties gathered from all the items in the shell item array. If there is more than one item in the shell item array, then the resulting property store will aggregate the values from each item according to a set of rules determined by each property. Values read from the property store will be coerced to a canonical form prior to aggregation as discussed at <a href="https://docs.microsoft.com/windows/desktop/api/propsys/nf-propsys-ipropertydescription-coercetocanonicalvalue">CoerceToCanonicalValue</a>. The output from a call to <a href="https://docs.microsoft.com/previous-versions/windows/desktop/legacy/bb761473(v=vs.85)">IPropertyStore::GetValue</a> is computed as follows: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertystore#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetPropertyStore(winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS flags, global::System.Guid* riid, void** ppv)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IShellItemArray*)Unsafe.AsPointer(ref this), flags, riid, ppv).ThrowOnFailure();
}
/// <inheritdoc cref="GetPropertyDescriptionList(winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY*, global::System.Guid*, void**)"/>
internal unsafe void GetPropertyDescriptionList(in winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY keyType, in global::System.Guid riid, out void* ppv)
{
fixed (void** ppvLocal = &ppv)
{
fixed (global::System.Guid* riidLocal = &riid)
{
fixed (winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* keyTypeLocal = &keyType)
{
this.GetPropertyDescriptionList(keyTypeLocal, riidLocal, ppvLocal);
}
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPropertyDescriptionList(IShellItemArray* pThis, winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* keyType, global::System.Guid* riid, void** ppv)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPropertyDescriptionList(keyType, riid, ppv);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets a property description list for the items in the shell item array.</summary>
/// <param name="keyType">
/// <para>Type: <b>REFPROPERTYKEY</b> A reference to the <a href="https://docs.microsoft.com/windows/desktop/api/wtypes/ns-wtypes-propertykey">PROPERTYKEY</a> structure specifying which property list to retrieve.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertydescriptionlist#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="riid">
/// <para>Type: <b>REFIID</b> The IID of the object type to retrieve.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertydescriptionlist#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ppv">
/// <para>Type: <b>void**</b> When this method returns, contains the interface requested in riid. This will typically be <a href="https://docs.microsoft.com/windows/desktop/api/propsys/nn-propsys-ipropertydescriptionlist">IPropertyDescriptionList</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertydescriptionlist#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>This function is used to determine a list of properties that are applicable to a set of shell items. The type of list is specified by a <a href="https://docs.microsoft.com/windows/desktop/api/wtypes/ns-wtypes-propertykey">PROPERTYKEY</a> structure. Supported list types include but are not limited to:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getpropertydescriptionlist#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetPropertyDescriptionList(winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* keyType, global::System.Guid* riid, void** ppv)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IShellItemArray*)Unsafe.AsPointer(ref this), keyType, riid, ppv).ThrowOnFailure();
}
/// <inheritdoc cref="GetAttributes(winmdroot.UI.Shell.SIATTRIBFLAGS, winmdroot.System.SystemServices.SFGAO_FLAGS, winmdroot.System.SystemServices.SFGAO_FLAGS*)"/>
internal unsafe void GetAttributes(winmdroot.UI.Shell.SIATTRIBFLAGS AttribFlags, winmdroot.System.SystemServices.SFGAO_FLAGS sfgaoMask, out winmdroot.System.SystemServices.SFGAO_FLAGS psfgaoAttribs)
{
fixed (winmdroot.System.SystemServices.SFGAO_FLAGS* psfgaoAttribsLocal = &psfgaoAttribs)
{
this.GetAttributes(AttribFlags, sfgaoMask, psfgaoAttribsLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetAttributes(IShellItemArray* pThis, winmdroot.UI.Shell.SIATTRIBFLAGS AttribFlags, winmdroot.System.SystemServices.SFGAO_FLAGS sfgaoMask, winmdroot.System.SystemServices.SFGAO_FLAGS* psfgaoAttribs)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetAttributes(AttribFlags, sfgaoMask, psfgaoAttribs);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the attributes of the set of items contained in an IShellItemArray.</summary>
/// <param name="AttribFlags">Type: <b>SIATTRIBFLAGS</b></param>
/// <param name="sfgaoMask">
/// <para>Type: <b>SFGAOF</b> A mask that specifies what particular attributes are being requested. A bitwise OR of one or more of the <a href="https://docs.microsoft.com/windows/desktop/shell/sfgao">SFGAO</a> values.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getattributes#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="psfgaoAttribs">
/// <para>Type: <b>SFGAOF*</b> A bitmap that, when this method returns successfully, contains the values of the requested attributes.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getattributes#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> Returns S_OK if the attributes returned exactly match those requested in <i>sfgaoMask</i>, S_FALSE if the attributes do not exactly match, or a standard COM error value otherwise.</para>
/// </returns>
/// <remarks>
/// <para>The Shell item array caches individual attributes after they have been determined. As this method passes through the array gathering attribute information, it normally stops looking at a particular attribute after that value is irrevocably set. For instance, if the SIATTRIBFLAGS_AND flag is set, after an attribute is found not to be set on an item (a value of 0), there is no need to continue examining that attribute value on other items because the result of the AND operation will always be 0. Therefore, the final set of attributes is commonly calculated by looking at only the first few items in the array, which is all that is needed to obtain the final value. If you have a need to examine all items in the array, set the SIATTRIBFLAGS_ALLITEMS flag. However, be aware that this can slow the method's return considerably, so do not do so without cause.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getattributes#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetAttributes(winmdroot.UI.Shell.SIATTRIBFLAGS AttribFlags, winmdroot.System.SystemServices.SFGAO_FLAGS sfgaoMask, winmdroot.System.SystemServices.SFGAO_FLAGS* psfgaoAttribs)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.SIATTRIBFLAGS ,winmdroot.System.SystemServices.SFGAO_FLAGS ,winmdroot.System.SystemServices.SFGAO_FLAGS* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IShellItemArray*)Unsafe.AsPointer(ref this), AttribFlags, sfgaoMask, psfgaoAttribs).ThrowOnFailure();
}
/// <inheritdoc cref="GetCount(uint*)"/>
internal unsafe void GetCount(out uint pdwNumItems)
{
fixed (uint* pdwNumItemsLocal = &pdwNumItems)
{
this.GetCount(pdwNumItemsLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetCount(IShellItemArray* pThis, uint* pdwNumItems)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetCount(pdwNumItems);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the number of items in the given IShellItem array.</summary>
/// <param name="pdwNumItems">
/// <para>Type: <b>DWORD*</b> When this method returns, contains the number of items in the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitemarray">IShellItemArray</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getcount#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-ishellitemarray-getcount">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetCount(uint* pdwNumItems)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IShellItemArray*)Unsafe.AsPointer(ref this), pdwNumItems).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetItemAt(IShellItemArray* pThis, uint dwIndex, winmdroot.UI.Shell.IShellItem** ppsi)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetItemAt(dwIndex, ppsi);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the item at the given index in the IShellItemArray.</summary>
/// <param name="dwIndex">
/// <para>Type: <b>DWORD</b> The index of the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a> requested in the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitemarray">IShellItemArray</a></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getitemat#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="ppsi">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a>**</b> When this method returns, contains the requested <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">IShellItem</a> pointer.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-getitemat#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>This function returns E_FAIL if the requested index is out of bounds of the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitemarray">IShellItemArray</a>.</remarks>
public unsafe void GetItemAt(uint dwIndex, winmdroot.UI.Shell.IShellItem** ppsi)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,uint ,winmdroot.UI.Shell.IShellItem** ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IShellItemArray*)Unsafe.AsPointer(ref this), dwIndex, ppsi).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT EnumItems(IShellItemArray* pThis, winmdroot.UI.Shell.IEnumShellItems** ppenumShellItems)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.EnumItems(ppenumShellItems);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets an enumerator of the items in the array.</summary>
/// <param name="ppenumShellItems">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumshellitems">IEnumShellItems</a>**</b> When this method returns, contains an <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumshellitems">IEnumShellItems</a> pointer that enumerates the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellitem">shell items</a> that are in the array.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitemarray-enumitems#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-ishellitemarray-enumitems">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void EnumItems(winmdroot.UI.Shell.IEnumShellItems** ppenumShellItems)
{
((delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.IEnumShellItems** ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IShellItemArray*)Unsafe.AsPointer(ref this), ppenumShellItems).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]<IShellItemArray*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> BindToHandler_4;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> GetPropertyStore_5;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> GetPropertyDescriptionList_6;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.SIATTRIBFLAGS ,winmdroot.System.SystemServices.SFGAO_FLAGS ,winmdroot.System.SystemServices.SFGAO_FLAGS* ,winmdroot.Foundation.HRESULT> GetAttributes_7;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,uint* ,winmdroot.Foundation.HRESULT> GetCount_8;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,uint ,winmdroot.UI.Shell.IShellItem** ,winmdroot.Foundation.HRESULT> GetItemAt_9;
internal delegate *unmanaged [Stdcall]<IShellItemArray*,winmdroot.UI.Shell.IEnumShellItems** ,winmdroot.Foundation.HRESULT> EnumItems_10;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->BindToHandler_4 = &BindToHandler;
vtable->GetPropertyStore_5 = &GetPropertyStore;
vtable->GetPropertyDescriptionList_6 = &GetPropertyDescriptionList;
vtable->GetAttributes_7 = &GetAttributes;
vtable->GetCount_8 = &GetCount;
vtable->GetItemAt_9 = &GetItemAt;
vtable->EnumItems_10 = &EnumItems;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{b63ea76d-1f85-456f-a19c-48159efa858b}</value>
internal static readonly Guid IID_Guid = new Guid(0xB63EA76D, 0x1F85, 0x456F, 0xA1, 0x9C, 0x48, 0x15, 0x9E, 0xFA, 0x85, 0x8B);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x6D,0xA7,0x3E,0xB6,0x85,0x1F,0x6F,0x45,0xA1,0x9C,0x48,0x15,0x9E,0xFA,0x85,0x8B };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("B63EA76D-1F85-456F-A19C-48159EFA858B"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows6.0.6000")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT BindToHandler(winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* bhid, global::System.Guid* riid, void** ppvOut);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPropertyStore(winmdroot.UI.Shell.PropertiesSystem.GETPROPERTYSTOREFLAGS flags, global::System.Guid* riid, void** ppv);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPropertyDescriptionList(winmdroot.UI.Shell.PropertiesSystem.PROPERTYKEY* keyType, global::System.Guid* riid, void** ppv);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetAttributes(winmdroot.UI.Shell.SIATTRIBFLAGS AttribFlags, winmdroot.System.SystemServices.SFGAO_FLAGS sfgaoMask, winmdroot.System.SystemServices.SFGAO_FLAGS* psfgaoAttribs);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetCount(uint* pdwNumItems);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetItemAt(uint dwIndex, winmdroot.UI.Shell.IShellItem** ppsi);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT EnumItems(winmdroot.UI.Shell.IEnumShellItems** ppenumShellItems);
}
}
}
}
|