File: Windows.Win32.IShellFolder.g.cs
Project: src\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj (System.Windows.Forms.Primitives)
// ------------------------------------------------------------------------------
// <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("000214E6-0000-0000-C000-000000000046")]
		[SupportedOSPlatform("windows5.1.2600")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IShellFolder
			:IVTable<IShellFolder,IShellFolder.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]<IShellFolder*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IShellFolder*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

			public uint AddRef()
			{
				return ((delegate *unmanaged [Stdcall]<IShellFolder*,uint>)lpVtbl[1])((IShellFolder*)Unsafe.AsPointer(ref this));
			}

			public uint Release()
			{
				return ((delegate *unmanaged [Stdcall]<IShellFolder*,uint>)lpVtbl[2])((IShellFolder*)Unsafe.AsPointer(ref this));
			}

			/// <inheritdoc cref="ParseDisplayName(winmdroot.Foundation.HWND, winmdroot.System.Com.IBindCtx*, winmdroot.Foundation.PWSTR, uint*, winmdroot.UI.Shell.Common.ITEMIDLIST**, uint*)"/>
			internal unsafe void ParseDisplayName(winmdroot.Foundation.HWND hwnd, winmdroot.System.Com.IBindCtx* pbc, winmdroot.Foundation.PWSTR pszDisplayName, out winmdroot.UI.Shell.Common.ITEMIDLIST* ppidl, ref uint pdwAttributes)
			{
				fixed (uint* pdwAttributesLocal = &pdwAttributes)
				{
					fixed (winmdroot.UI.Shell.Common.ITEMIDLIST** ppidlLocal = &ppidl)
					{
						this.ParseDisplayName(hwnd, pbc, pszDisplayName, default, ppidlLocal, pdwAttributesLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT ParseDisplayName(IShellFolder* pThis, winmdroot.Foundation.HWND hwnd, winmdroot.System.Com.IBindCtx* pbc, winmdroot.Foundation.PWSTR pszDisplayName, [Optional] uint* pchEaten, winmdroot.UI.Shell.Common.ITEMIDLIST** ppidl, uint* pdwAttributes)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.ParseDisplayName(hwnd, pbc, pszDisplayName, pchEaten, ppidl, pdwAttributes);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Translates the display name of a file object or a folder into an item identifier list.</summary>
			/// <param name="hwnd">
			/// <para>Type: <b>HWND</b> A window handle. The client should provide a window handle if it displays a dialog or message box. Otherwise set <i>hwnd</i> to <b>NULL</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pbc">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ibindctx">IBindCtx</a>*</b> Optional. A pointer to a bind context used to pass parameters as inputs and outputs to the parsing function. These passed parameters are often specific to the data source and are documented by the data source owners. For example, the file system data source accepts the name being parsed (as a <a href="https://docs.microsoft.com/windows/desktop/api/minwinbase/ns-minwinbase-win32_find_dataa">WIN32_FIND_DATA</a> structure), using the <a href="https://docs.microsoft.com/windows/desktop/shell/str-constants">STR_FILE_SYS_BIND_DATA</a> bind context parameter. <a href="https://docs.microsoft.com/windows/desktop/shell/str-constants">STR_PARSE_PREFER_FOLDER_BROWSING</a> can be passed to indicate that URLs are parsed using the file system data source when possible. Construct a bind context object using <a href="https://docs.microsoft.com/windows/desktop/api/objbase/nf-objbase-createbindctx">CreateBindCtx</a> and populate the values using <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ibindctx-registerobjectparam">IBindCtx::RegisterObjectParam</a>. See <b>Bind Context String Keys</b> for a complete list of these.</para>
			/// <para>If no data is being passed to or received from the parsing function, this value can be <b>NULL</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pszDisplayName">
			/// <para>Type: <b>LPWSTR</b> A null-terminated Unicode string with the display name. Because each Shell folder defines its own parsing syntax, the form this string can take may vary. The desktop folder, for instance, accepts paths such as "C:\My Docs\My File.txt". It also will accept references to items in the namespace that have a GUID associated with them using the "::{GUID}" syntax. For example, to retrieve a fully qualified identifier list for the control panel from the desktop folder, you can use the following:</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pchEaten">
			/// <para>Type: <b>ULONG*</b> A pointer to a <b>ULONG</b> value that receives the number of characters of the display name that was parsed. If your application does not need this information, set <i>pchEaten</i> to <b>NULL</b>, and no value will be returned.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppidl">
			/// <para>Type: <b>PIDLIST_RELATIVE*</b> When this method returns, contains a pointer to the PIDL for the object. The returned item identifier list specifies the item relative to the parsing folder. If the object associated with <i>pszDisplayName</i> is within the parsing folder, the returned item identifier list will contain only one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure. If the object is in a subfolder of the parsing folder, the returned item identifier list will contain multiple <b>SHITEMID</b> structures. If an error occurs, <b>NULL</b> is returned in this address.</para>
			/// <para>When it is no longer needed, it is the responsibility of the caller to free this resource by calling <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cotaskmemfree">CoTaskMemFree</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pdwAttributes">
			/// <para>Type: <b>ULONG*</b> The value used to query for file attributes. If not used, it should be set to <b>NULL</b>. To query for one or more attributes, initialize this parameter with the <a href="https://docs.microsoft.com/windows/desktop/shell/sfgao">SFGAO</a> flags that represent the attributes of interest. On return, those attributes that are true <i>and</i> were requested will be set.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#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>Some Shell folders may not implement <b>IShellFolder::ParseDisplayName</b>. Each folder that does will define its own parsing syntax. <b>ParseDisplayName</b> is not expected to handle the relative path or parent folder indicators (".\" or "..\"). It is up to the caller to remove these appropriately. Do not use the SFGAO_VALIDATE flag in <i>pdwAttributes</i> to verify the existence of the item whose name is being parsed. <b>IShellFolder::ParseDisplayName</b> implicitly validates the existence of the item unless that behavior is overridden by a special bind context parameter. Querying for some attributes may be relatively slow and use significant amounts of memory. For example, to determine if a file is shared, the Shell will load network components. This procedure may require the loading of several DLLs. The purpose of <i>pdwAttributes</i> is to allow you to restrict the query to only that information that is needed. The following code fragment illustrates how to find out if a file is compressed.</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void ParseDisplayName(winmdroot.Foundation.HWND hwnd, winmdroot.System.Com.IBindCtx* pbc, winmdroot.Foundation.PWSTR pszDisplayName, [Optional] uint* pchEaten, winmdroot.UI.Shell.Common.ITEMIDLIST** ppidl, uint* pdwAttributes)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IBindCtx* ,winmdroot.Foundation.PWSTR ,uint* ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IShellFolder*)Unsafe.AsPointer(ref this), hwnd, pbc, pszDisplayName, pchEaten, ppidl, pdwAttributes).ThrowOnFailure();
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT EnumObjects(IShellFolder* pThis, winmdroot.Foundation.HWND hwnd, uint grfFlags, winmdroot.UI.Shell.IEnumIDList** ppenumIDList)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.EnumObjects(hwnd, grfFlags, ppenumIDList);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Enables a client to determine the contents of a folder by creating an item identifier enumeration object and returning its IEnumIDList interface. The methods supported by that interface can then be used to enumerate the folder's contents.</summary>
			/// <param name="hwnd">
			/// <para>Type: <b>HWND</b> If user input is required to perform the enumeration, this window handle should be used by the enumeration object as the parent window to take user input. An example would be a dialog box to ask for a password or prompt the user to insert a CD or floppy disk. If <i>hwndOwner</i> is set to <b>NULL</b>, the enumerator should not post any messages, and if user input is required, it should silently fail.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-enumobjects#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="grfFlags">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shcontf">SHCONTF</a></b> Flags indicating which items to include in the enumeration. For a list of possible values, see the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shcontf">SHCONTF</a> enumerated type.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-enumobjects#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppenumIDList">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumidlist">IEnumIDList</a>**</b> The address that receives a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumidlist">IEnumIDList</a> interface of the enumeration object created by this method. If an error occurs or no suitable subobjects are found, <i>ppenumIDList</i> is set to <b>NULL</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-enumobjects#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b>HRESULT</b> Returns <c>S_OK</code> if successful, or an error value otherwise. Some implementations may also return <code>S_FALSE</code>, indicating that there are no children matching the <i>grfFlags</i> that were passed in. If <code>S_FALSE</code> is returned, <i>ppenumIDList</i> is set to <code>NULL</c>.</para>
			/// </returns>
			/// <remarks>
			/// <para>If the method returns S_OK, then <i>ppenumIDList</i> receives a pointer to an enumerator. In this case, the calling application must free the returned <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ienumidlist">IEnumIDList</a> object by calling its <b>Release</b> method. If the method returns S_FALSE, then the folder contains no suitable subobjects and the pointer specified in <i>ppenumIDList</i> is set to <b>NULL</b>. If the method fails, an error value is returned and the pointer specified in <i>ppenumIDList</i> is set to <b>NULL</b>. If the folder contains no suitable subobjects, then the <b>IShellFolder::EnumObjects</b> method is permitted either to set *<i>ppenumIDList</i> to <b>NULL</b> and return S_FALSE, or to set *<i>ppenumIDList</i> to an enumerator that produces no objects and return S_OK. Calling applications must be prepared for both success cases.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-enumobjects#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT EnumObjects(winmdroot.Foundation.HWND hwnd, uint grfFlags, winmdroot.UI.Shell.IEnumIDList** ppenumIDList)
			{
				return ((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,uint ,winmdroot.UI.Shell.IEnumIDList** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IShellFolder*)Unsafe.AsPointer(ref this), hwnd, grfFlags, ppenumIDList);
			}

			/// <inheritdoc cref="BindToObject(winmdroot.UI.Shell.Common.ITEMIDLIST*, winmdroot.System.Com.IBindCtx*, global::System.Guid*, void**)"/>
			internal unsafe void BindToObject(in winmdroot.UI.Shell.Common.ITEMIDLIST pidl, winmdroot.System.Com.IBindCtx* pbc, in global::System.Guid riid, out void* ppv)
			{
				fixed (void** ppvLocal = &ppv)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidlLocal = &pidl)
						{
							this.BindToObject(pidlLocal, pbc, riidLocal, ppvLocal);
						}
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT BindToObject(IShellFolder* pThis, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.BindToObject(pidl, pbc, riid, ppv);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves a handler, typically the Shell folder object that implements IShellFolder for a particular item. Optional parameters that control the construction of the handler are passed in the bind context.</summary>
			/// <param name="pidl">
			/// <para>Type: <b>PCUIDLIST_RELATIVE</b> The address of an <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure (PIDL) that identifies the subfolder. This value can refer to an item at any level below the parent folder in the namespace hierarchy. The structure contains one or more <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structures, followed by a terminating <b>NULL</b>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtoobject#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <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 that can be used to pass parameters to the construction of the handler. If this parameter is not used, set it to <b>NULL</b>. Because support for this parameter is optional for folder object implementations, some folders may not support the use of bind contexts.</para>
			/// <para>Information that can be provided in the bind context includes a <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-bind_opts">BIND_OPTS</a> structure that includes a <b>grfMode</b> member that indicates the access mode when binding to a stream handler. Other parameters can be set and discovered using <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ibindctx-registerobjectparam">IBindCtx::RegisterObjectParam</a> and <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ibindctx-getobjectparam">IBindCtx::GetObjectParam</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtoobject#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="riid">
			/// <para>Type: <b>REFIID</b> The identifier of the interface to return. This may be <b>IID_IShellFolder</b>, <b>IID_IStream</b>, or any other interface that identifies a particular handler.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtoobject#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppv">
			/// <para>Type: <b>void**</b> When this method returns, contains the address of a pointer to the requested interface. If an error occurs, a <b>NULL</b> pointer is returned at this address.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtoobject#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>Applications use <b>IShellFolder::BindToObject</b><b>(..., IID_IShellFolder, ...)</b> to obtain the Shell folder object for a subitem. Clients should pass the canonical interface IID that is used to identify a specific handler. For example, <b>IID_IShellFolder</b> identifies the folder handler and <b>IID_IStream</b> identifies the stream handler. Implementations can support binding to handlers using derived interfaces as well, such as <b>IID_IShellFolder2</b>. A Shell namespace extension can implement this function by creating the Shell folder object for the specified subitem and then calling <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q)">QueryInterface</a> to communicate with the object through its interface pointer. Implementations of <b>BindToObject</b> can optimize any call to it by quickly failing for IID values that it does not support. For example, if the Shell folder object of the subitem does not support <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-iremotecomputer">IRemoteComputer</a>, the implementation should return <b>E_NOINTERFACE</b> immediately instead of needlessly creating the Shell folder object for the subitem and then finding that <b>IRemoteComputer</b> was not supported after all.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtoobject#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void BindToObject(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IShellFolder*)Unsafe.AsPointer(ref this), pidl, pbc, riid, ppv).ThrowOnFailure();
			}

			/// <inheritdoc cref="BindToStorage(winmdroot.UI.Shell.Common.ITEMIDLIST*, winmdroot.System.Com.IBindCtx*, global::System.Guid*, void**)"/>
			internal unsafe void BindToStorage(in winmdroot.UI.Shell.Common.ITEMIDLIST pidl, winmdroot.System.Com.IBindCtx* pbc, in global::System.Guid riid, out void* ppv)
			{
				fixed (void** ppvLocal = &ppv)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidlLocal = &pidl)
						{
							this.BindToStorage(pidlLocal, pbc, riidLocal, ppvLocal);
						}
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT BindToStorage(IShellFolder* pThis, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.BindToStorage(pidl, pbc, riid, ppv);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Requests a pointer to an object's storage interface.</summary>
			/// <param name="pidl">
			/// <para>Type: <b>PCUIDLIST_RELATIVE</b> The address of an <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure that identifies the subfolder relative to its parent folder. The structure must contain exactly one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure followed by a terminating zero.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtostorage#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pbc">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ibindctx">IBindCtx</a>*</b> The optional address of an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ibindctx">IBindCtx</a> interface on a bind context object to be used during this operation. If this parameter is not used, set it to <b>NULL</b>. Because support for <i>pbc</i> is optional for folder object implementations, some folders may not support the use of bind contexts.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtostorage#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="riid">
			/// <para>Type: <b>REFIID</b> The IID of the requested storage interface. To retrieve an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-istream">IStream</a>, <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-istorage">IStorage</a>, or <a href="https://docs.microsoft.com/windows/desktop/api/propidl/nn-propidl-ipropertysetstorage">IPropertySetStorage</a> interface pointer, set <i>riid</i> to <b>IID_IStream</b>, <b>IID_IStorage</b>, or <b>IID_IPropertySetStorage</b>, respectively.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtostorage#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppv">
			/// <para>Type: <b>void**</b> The address that receives the interface pointer specified by <i>riid</i>. If an error occurs, a <b>NULL</b> pointer is returned in this address.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-bindtostorage#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>Namespace extensions have the option of allowing applications to bind to an object that represents an item's storage. If this option is supported, <b>IShellFolder::BindToStorage</b> returns a specified interface pointer that can then be used to access the contents of object. See the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-imoniker-bindtostorage">IMoniker::BindToStorage</a> reference for further discussion.</remarks>
			public unsafe void BindToStorage(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IShellFolder*)Unsafe.AsPointer(ref this), pidl, pbc, riid, ppv).ThrowOnFailure();
			}

			/// <inheritdoc cref="CompareIDs(winmdroot.Foundation.LPARAM, winmdroot.UI.Shell.Common.ITEMIDLIST*, winmdroot.UI.Shell.Common.ITEMIDLIST*)"/>
			internal unsafe winmdroot.Foundation.HRESULT CompareIDs(winmdroot.Foundation.LPARAM lParam, in winmdroot.UI.Shell.Common.ITEMIDLIST pidl1, in winmdroot.UI.Shell.Common.ITEMIDLIST pidl2)
			{
				fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidl2Local = &pidl2)
				{
					fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidl1Local = &pidl1)
					{
						winmdroot.Foundation.HRESULT __result = this.CompareIDs(lParam, pidl1Local, pidl2Local);
						return __result;
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT CompareIDs(IShellFolder* pThis, winmdroot.Foundation.LPARAM lParam, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl1, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl2)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.CompareIDs(lParam, pidl1, pidl2);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Determines the relative order of two file objects or folders, given their item identifier lists.</summary>
			/// <param name="lParam">
			/// <para>Type: <b>LPARAM</b> A value that specifies how the comparison should be performed.</para>
			/// <para>The lower sixteen bits of <i>lParam</i> define the sorting rule. Most applications set the sorting rule to the default value of zero, indicating that the two items should be compared by name. The system does not define any other sorting rules. Some folder objects might allow calling applications to use the lower sixteen bits of <i>lParam</i> to specify folder-specific sorting rules. The rules and their associated <i>lParam</i> values are defined by the folder. When the system folder view object calls <b>IShellFolder::CompareIDs</b>, the lower sixteen bits of <i>lParam</i> are used to specify the column to be used for the comparison. The upper sixteen bits of <i>lParam</i> are used for flags that modify the sorting rule. The system currently defines these modifier flags.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-compareids#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pidl1">
			/// <para>Type: <b>PCUIDLIST_RELATIVE</b> A pointer to the first item's <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure. It will be relative to the folder. This <b>ITEMIDLIST</b> structure can contain more than one element; therefore, the entire structure must be compared, not just the first element.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-compareids#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pidl2">
			/// <para>Type: <b>PCUIDLIST_RELATIVE</b> A pointer to the second item's <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure. It will be relative to the folder. This <b>ITEMIDLIST</b> structure can contain more than one element; therefore, the entire structure must be compared, not just the first element.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-compareids#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <returns>
			/// <para>Type: <b>HRESULT</b> If this method is successful, the CODE field of the <b>HRESULT</b> contains one of the following values. For information regarding the extraction of the CODE field from the returned <b>HRESULT</b>, see Remarks. If this method is unsuccessful, it returns a COM error code. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para><h3><a id="Note_to_Calling_Applications"></a><a id="note_to_calling_applications"></a><a id="NOTE_TO_CALLING_APPLICATIONS"></a>Note to Calling Applications</h3> Do not set the <b>SHCIDS_ALLFIELDS</b> flag in <i>lParam</i> if the folder object does not support <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellfolder2">IShellFolder2</a>. Doing so might have unpredictable results. If you use the <b>SHCIDS_ALLFIELDS</b> flag, the lower sixteen bits of <i>lParam</i> must be set to zero. Use the <a href="https://docs.microsoft.com/windows/desktop/api/winerror/nf-winerror-hresult_code">HRESULT_CODE</a> macro to extract the CODE field from the <b>HRESULT</b>, then cast the result as a <b>short</b>.</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-compareids#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT CompareIDs(winmdroot.Foundation.LPARAM lParam, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl1, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl2)
			{
				return ((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.LPARAM ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IShellFolder*)Unsafe.AsPointer(ref this), lParam, pidl1, pidl2);
			}

			/// <inheritdoc cref="CreateViewObject(winmdroot.Foundation.HWND, global::System.Guid*, void**)"/>
			internal unsafe void CreateViewObject(winmdroot.Foundation.HWND hwndOwner, in global::System.Guid riid, out void* ppv)
			{
				fixed (void** ppvLocal = &ppv)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						this.CreateViewObject(hwndOwner, riidLocal, ppvLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT CreateViewObject(IShellFolder* pThis, winmdroot.Foundation.HWND hwndOwner, global::System.Guid* riid, void** ppv)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.CreateViewObject(hwndOwner, riid, ppv);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Requests an object that can be used to obtain information from or interact with a folder object.</summary>
			/// <param name="hwndOwner">
			/// <para>Type: <b>HWND</b> A handle to the owner window. If you have implemented a custom folder view object, your folder view window should be created as a child of <i>hwndOwner</i>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-createviewobject#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="riid">
			/// <para>Type: <b>REFIID</b> A reference to the IID of the interface to retrieve through <i>ppv</i>, typically IID_IShellView.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-createviewobject#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppv">
			/// <para>Type: <b>void**</b> When this method returns successfully, contains the interface pointer requested in <i>riid</i>. This is typically <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellview">IShellView</a>. See the Remarks section for more details.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-createviewobject#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>To support this request, create an object that exposes the interface indicated by <i>riid</i> and return a pointer to that interface. The primary purpose of this method is to provide Windows Explorer with the folder object's folder view object. Windows Explorer requests a folder view object by setting <i>riid</i> to IID_IShellView. The folder view object displays the contents of the folder in the Windows Explorer folder view. The folder view object must be independent of the Shell folder object, because Windows Explorer may call this method more than once to create multiple folder view objects. A new view object must be created each time this method is called. Your folder object can respond in one of two ways to this request. It can:</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-createviewobject#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void CreateViewObject(winmdroot.Foundation.HWND hwndOwner, global::System.Guid* riid, void** ppv)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IShellFolder*)Unsafe.AsPointer(ref this), hwndOwner, riid, ppv).ThrowOnFailure();
			}

			/// <inheritdoc cref="GetAttributesOf(uint, winmdroot.UI.Shell.Common.ITEMIDLIST**, uint*)"/>
			internal unsafe void GetAttributesOf(uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, ref uint rgfInOut)
			{
				fixed (uint* rgfInOutLocal = &rgfInOut)
				{
					this.GetAttributesOf(cidl, apidl, rgfInOutLocal);
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetAttributesOf(IShellFolder* pThis, uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, uint* rgfInOut)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetAttributesOf(cidl, apidl, rgfInOut);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets the attributes of one or more file or folder objects contained in the object represented by IShellFolder.</summary>
			/// <param name="cidl">
			/// <para>Type: <b>UINT</b> The number of items from which to retrieve attributes.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getattributesof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="apidl">
			/// <para>Type: <b>PCUITEMID_CHILD_ARRAY*</b> The address of an array of pointers to <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structures, each of which uniquely identifies an item relative to the parent folder. Each <b>ITEMIDLIST</b> structure must contain exactly one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure followed by a terminating zero.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getattributesof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="rgfInOut">
			/// <para>Type: <b>SFGAOF*</b> Pointer to a single <b>ULONG</b> value that, on entry, contains the bitwise <a href="https://docs.microsoft.com/windows/desktop/shell/sfgao">SFGAO</a> attributes that the calling application is requesting. On exit, this value contains the requested attributes that are common to all of the specified items.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getattributesof#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>To optimize this operation, do not return unspecified flags. For a folder object, the <a href="https://docs.microsoft.com/windows/desktop/shell/sfgao">SFGAO_BROWSABLE</a> attribute implies that the client can bind to this object as shown in a general form here.</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getattributesof#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void GetAttributesOf(uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, uint* rgfInOut)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,uint ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IShellFolder*)Unsafe.AsPointer(ref this), cidl, apidl, rgfInOut).ThrowOnFailure();
			}

			/// <inheritdoc cref="GetUIObjectOf(winmdroot.Foundation.HWND, uint, winmdroot.UI.Shell.Common.ITEMIDLIST**, global::System.Guid*, uint*, void**)"/>
			internal unsafe void GetUIObjectOf(winmdroot.Foundation.HWND hwndOwner, uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, in global::System.Guid riid, out void* ppv)
			{
				fixed (void** ppvLocal = &ppv)
				{
					fixed (global::System.Guid* riidLocal = &riid)
					{
						this.GetUIObjectOf(hwndOwner, cidl, apidl, riidLocal, default, ppvLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetUIObjectOf(IShellFolder* pThis, winmdroot.Foundation.HWND hwndOwner, uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, global::System.Guid* riid, [Optional] uint* rgfReserved, void** ppv)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetUIObjectOf(hwndOwner, cidl, apidl, riid, rgfReserved, ppv);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Gets an object that can be used to carry out actions on the specified file objects or folders.</summary>
			/// <param name="hwndOwner">
			/// <para>Type: <b>HWND</b> A handle to the owner window that the client should specify if it displays a dialog box or message box.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="cidl">
			/// <para>Type: <b>UINT</b> The number of file objects or subfolders specified in the <i>apidl</i> parameter.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="apidl">
			/// <para>Type: <b>PCUITEMID_CHILD_ARRAY</b> The address of an array of pointers to <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structures, each of which uniquely identifies a file object or subfolder relative to the parent folder. Each item identifier list must contain exactly one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure followed by a terminating zero.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="riid">
			/// <para>Type: <b>REFIID</b> A reference to the IID of the interface to retrieve through <i>ppv</i>. This can be any valid interface identifier that can be created for an item. The most common identifiers used by the Shell are listed in the comments at the end of this reference.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="rgfReserved">
			/// <para>Type: <b>UINT*</b> Reserved.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppv">
			/// <para>Type: <b>void**</b> When this method returns successfully, contains the interface pointer requested in <i>riid</i>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#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>If <i>cidl</i> is greater than one, the <b>IShellFolder::GetUIObjectOf</b> implementation should only succeed if it can create one object for all items specified in <i>apidl</i>. If the implementation cannot create one object for all items, this method will fail. The following are the most common interface identifiers the Shell uses when requesting an interface from this method. The list also indicates if <i>cidl</i> can be greater than one for the requested interface. </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getuiobjectof#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void GetUIObjectOf(winmdroot.Foundation.HWND hwndOwner, uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, global::System.Guid* riid, [Optional] uint* rgfReserved, void** ppv)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,uint ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,global::System.Guid* ,uint* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IShellFolder*)Unsafe.AsPointer(ref this), hwndOwner, cidl, apidl, riid, rgfReserved, ppv).ThrowOnFailure();
			}

			/// <inheritdoc cref="GetDisplayNameOf(winmdroot.UI.Shell.Common.ITEMIDLIST*, winmdroot.UI.Shell.SHGDNF, winmdroot.UI.Shell.Common.STRRET*)"/>
			internal unsafe void GetDisplayNameOf(in winmdroot.UI.Shell.Common.ITEMIDLIST pidl, winmdroot.UI.Shell.SHGDNF uFlags, out winmdroot.UI.Shell.Common.STRRET pName)
			{
				fixed (winmdroot.UI.Shell.Common.STRRET* pNameLocal = &pName)
				{
					fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidlLocal = &pidl)
					{
						this.GetDisplayNameOf(pidlLocal, uFlags, pNameLocal);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT GetDisplayNameOf(IShellFolder* pThis, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.UI.Shell.SHGDNF uFlags, winmdroot.UI.Shell.Common.STRRET* pName)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.GetDisplayNameOf(pidl, uFlags, pName);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Retrieves the display name for the specified file object or subfolder.</summary>
			/// <param name="pidl">
			/// <para>Type: <b>PCUITEMID_CHILD</b> PIDL that uniquely identifies the file object or subfolder relative to the parent folder.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getdisplaynameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="uFlags">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDNF</a></b> Flags used to request the type of display name to return. For a list of possible values, see the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDNF</a> enumerated type.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getdisplaynameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pName">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-strret">STRRET</a>*</b> When this method returns, contains a pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-strret">STRRET</a> structure in which to return the display name. The type of name returned in this structure can be the requested type, but the Shell folder might return a different type.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getdisplaynameof#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>It is the caller's responsibility to free resources allocated by this function. Normally, <i>pidl</i> can refer only to items contained by the parent folder. The PIDL must be single-level and contain exactly one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure followed by a terminating zero. If you want to retrieve the display name of an item that is deeper than one level away from the parent folder, use <a href="https://docs.microsoft.com/windows/desktop/api/shlobj_core/nf-shlobj_core-shbindtoparent">SHBindToParent</a> to bind with the item's immediate parent folder and then pass the item's single-level PIDL to <b>IShellFolder::GetDisplayNameOf</b>. Also, if the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDN_FORPARSING</a> flag is set in <i>uFlags</i> and the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDN_INFOLDER</a> flag is not set, <i>pidl</i> can refer to an object at any level below the parent folder in the namespace hierarchy. At one time, <i>pidl</i> could be a multilevel PIDL, relative to the parent folder, and could contain multiple <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structures. However, this is no longer supported and <i>pidl</i> should now refer only to a single child item. The simplest way to retrieve the display name from the structure pointed to by <i>pName</i> is to pass it to either <a href="https://docs.microsoft.com/windows/desktop/api/shlwapi/nf-shlwapi-strrettobufa">StrRetToBuf</a> or <a href="https://docs.microsoft.com/windows/desktop/api/shlwapi/nf-shlwapi-strrettostra">StrRetToStr</a>. These functions take a <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-strret">STRRET</a> structure and return the name. You can also examine the structure's <b>uType</b> member, and retrieve the name from the appropriate member. The flags specified in <i>uFlags</i> are hints about the intended use of the name. They do not guarantee that <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ishellfolder">IShellFolder</a> will return the requested form of the name. If that form is not available, a different one might be returned. In particular, there is no guarantee that the name returned by the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDN_FORPARSING</a> flag will be successfully parsed by <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ishellfolder-parsedisplayname">IShellFolder::ParseDisplayName</a>. There are also some combinations of flags that might cause the <b>GetDisplayNameOf</b>/<b>ParseDisplayName</b> round trip to not return the original identifier list. This occurrence is exceptional, but you should check to be sure. <div class="alert"><b>Note</b>  The parsing name that is returned when <i>uFlags</i> has the <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDN_FORPARSING</a> flag set is not necessarily a normal text string. Virtual folders such as My Computer might return a string containing the folder object's GUID in the form "::{GUID}". Developers who implement <b>IShellFolder::GetDisplayNameOf</b> are encouraged to return parse names that are as close to the display names as possible, because the end user often needs to type or edit these names.</div> <div> </div></para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getdisplaynameof#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void GetDisplayNameOf(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.UI.Shell.SHGDNF uFlags, winmdroot.UI.Shell.Common.STRRET* pName)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.UI.Shell.SHGDNF ,winmdroot.UI.Shell.Common.STRRET* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IShellFolder*)Unsafe.AsPointer(ref this), pidl, uFlags, pName).ThrowOnFailure();
			}

			/// <inheritdoc cref="SetNameOf(winmdroot.Foundation.HWND, winmdroot.UI.Shell.Common.ITEMIDLIST*, winmdroot.Foundation.PCWSTR, winmdroot.UI.Shell.SHGDNF, winmdroot.UI.Shell.Common.ITEMIDLIST**)"/>
			internal unsafe void SetNameOf(winmdroot.Foundation.HWND hwnd, in winmdroot.UI.Shell.Common.ITEMIDLIST pidl, string pszName, winmdroot.UI.Shell.SHGDNF uFlags, winmdroot.UI.Shell.Common.ITEMIDLIST** ppidlOut)
			{
				fixed (char* pszNameLocal = pszName)
				{
					fixed (winmdroot.UI.Shell.Common.ITEMIDLIST* pidlLocal = &pidl)
					{
						this.SetNameOf(hwnd, pidlLocal, pszNameLocal, uFlags, ppidlOut);
					}
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT SetNameOf(IShellFolder* pThis, winmdroot.Foundation.HWND hwnd, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.Foundation.PCWSTR pszName, winmdroot.UI.Shell.SHGDNF uFlags, [Optional] winmdroot.UI.Shell.Common.ITEMIDLIST** ppidlOut)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.SetNameOf(hwnd, pidl, pszName, uFlags, ppidlOut);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Sets the display name of a file object or subfolder, changing the item identifier in the process.</summary>
			/// <param name="hwnd">
			/// <para>Type: <b>HWND</b> A handle to the owner window of any dialog or message box that the client displays.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pidl">
			/// <para>Type: <b>PCUITEMID_CHILD</b> A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure that uniquely identifies the file object or subfolder relative to the parent folder. The structure must contain exactly one <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-shitemid">SHITEMID</a> structure followed by a terminating zero.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="pszName">
			/// <para>Type: <b>LPCWSTR</b> A pointer to a null-terminated string that specifies the new display name.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="uFlags">
			/// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDNF</a></b> Flags that indicate the type of name specified by the <i>pszName</i> parameter. For a list of possible values and combinations of values, see <a href="https://docs.microsoft.com/windows/win32/api/shobjidl_core/ne-shobjidl_core-_shgdnf">SHGDNF</a>.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#parameters">Read more on docs.microsoft.com</see>.</para>
			/// </param>
			/// <param name="ppidlOut">
			/// <para>Type: <b>PITEMID_CHILD*</b> Optional. If specified, the address of a pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/shtypes/ns-shtypes-itemidlist">ITEMIDLIST</a> structure that receives the <b>ITEMIDLIST</b> of the renamed item. The caller requests this value by passing a non-null <i>ppidlOut</i>. Implementations of <b>IShellFolder::SetNameOf</b> must return a pointer to the new <b>ITEMIDLIST</b> in the <i>ppidlOut</i> parameter.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#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>Changing the display name of a file system object, or a folder within it, renames the file or directory. Before calling this method, applications should call <a href="https://docs.microsoft.com/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ishellfolder-getattributesof">IShellFolder::GetAttributesOf</a> and check that the SFGAO_CANRENAME flag is set. Note that this flag is essentially a hint to namespace clients. It does not necessarily imply that <b>IShellFolder::SetNameOf</b> will succeed or fail. Implementers of <b>IShellFolder::SetNameOf</b> must call <a href="https://docs.microsoft.com/windows/desktop/api/shlobj_core/nf-shlobj_core-shchangenotify">SHChangeNotify</a> with both the old and new absolute PIDLs once the renaming of an object is complete. This following example shows the call to <b>SHChangeNotify</b> following the renaming of a folder object.</para>
			/// <para></para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellfolder-setnameof#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe void SetNameOf(winmdroot.Foundation.HWND hwnd, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.Foundation.PCWSTR pszName, winmdroot.UI.Shell.SHGDNF uFlags, [Optional] winmdroot.UI.Shell.Common.ITEMIDLIST** ppidlOut)
			{
				((delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.Foundation.PCWSTR ,winmdroot.UI.Shell.SHGDNF ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((IShellFolder*)Unsafe.AsPointer(ref this), hwnd, pidl, pszName, uFlags, ppidlOut).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]<IShellFolder*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,uint> AddRef_2;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,uint> Release_3;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IBindCtx* ,winmdroot.Foundation.PWSTR ,uint* ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,uint* ,winmdroot.Foundation.HRESULT> ParseDisplayName_4;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,uint ,winmdroot.UI.Shell.IEnumIDList** ,winmdroot.Foundation.HRESULT> EnumObjects_5;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> BindToObject_6;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.System.Com.IBindCtx* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> BindToStorage_7;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.LPARAM ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.Foundation.HRESULT> CompareIDs_8;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> CreateViewObject_9;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,uint ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,uint* ,winmdroot.Foundation.HRESULT> GetAttributesOf_10;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,uint ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,global::System.Guid* ,uint* ,void** ,winmdroot.Foundation.HRESULT> GetUIObjectOf_11;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.UI.Shell.SHGDNF ,winmdroot.UI.Shell.Common.STRRET* ,winmdroot.Foundation.HRESULT> GetDisplayNameOf_12;

				internal delegate *unmanaged [Stdcall]<IShellFolder*,winmdroot.Foundation.HWND ,winmdroot.UI.Shell.Common.ITEMIDLIST* ,winmdroot.Foundation.PCWSTR ,winmdroot.UI.Shell.SHGDNF ,winmdroot.UI.Shell.Common.ITEMIDLIST** ,winmdroot.Foundation.HRESULT> SetNameOf_13;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->ParseDisplayName_4 = &ParseDisplayName;
				vtable->EnumObjects_5 = &EnumObjects;
				vtable->BindToObject_6 = &BindToObject;
				vtable->BindToStorage_7 = &BindToStorage;
				vtable->CompareIDs_8 = &CompareIDs;
				vtable->CreateViewObject_9 = &CreateViewObject;
				vtable->GetAttributesOf_10 = &GetAttributesOf;
				vtable->GetUIObjectOf_11 = &GetUIObjectOf;
				vtable->GetDisplayNameOf_12 = &GetDisplayNameOf;
				vtable->SetNameOf_13 = &SetNameOf;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{000214e6-0000-0000-c000-000000000046}</value>
			internal static readonly Guid IID_Guid = new Guid(0x000214E6, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);

			static ref readonly Guid IComIID.Guid			{
								[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
				{
					ReadOnlySpan<byte> data = new byte[]					{
0xE6,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46					};
					return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
				}
			}
			[Guid("000214E6-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.1.2600")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT ParseDisplayName(winmdroot.Foundation.HWND hwnd, winmdroot.System.Com.IBindCtx* pbc, winmdroot.Foundation.PWSTR pszDisplayName, [Optional] uint* pchEaten, winmdroot.UI.Shell.Common.ITEMIDLIST** ppidl, uint* pdwAttributes);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT EnumObjects(winmdroot.Foundation.HWND hwnd, uint grfFlags, winmdroot.UI.Shell.IEnumIDList** ppenumIDList);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT BindToObject(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT BindToStorage(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.System.Com.IBindCtx* pbc, global::System.Guid* riid, void** ppv);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT CompareIDs(winmdroot.Foundation.LPARAM lParam, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl1, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl2);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT CreateViewObject(winmdroot.Foundation.HWND hwndOwner, global::System.Guid* riid, void** ppv);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetAttributesOf(uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, uint* rgfInOut);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetUIObjectOf(winmdroot.Foundation.HWND hwndOwner, uint cidl, winmdroot.UI.Shell.Common.ITEMIDLIST** apidl, global::System.Guid* riid, [Optional] uint* rgfReserved, void** ppv);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT GetDisplayNameOf(winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.UI.Shell.SHGDNF uFlags, winmdroot.UI.Shell.Common.STRRET* pName);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT SetNameOf(winmdroot.Foundation.HWND hwnd, winmdroot.UI.Shell.Common.ITEMIDLIST* pidl, winmdroot.Foundation.PCWSTR pszName, winmdroot.UI.Shell.SHGDNF uFlags, [Optional] winmdroot.UI.Shell.Common.ITEMIDLIST** ppidlOut);
			}
		}
	}
}