diff --git a/PInvoke/Shell32/ShObjIdl.cs b/PInvoke/Shell32/ShObjIdl.cs
index 885d0bad..bd250464 100644
--- a/PInvoke/Shell32/ShObjIdl.cs
+++ b/PInvoke/Shell32/ShObjIdl.cs
@@ -1009,65 +1009,200 @@ namespace Vanara.PInvoke
}
/// Exposes methods that store file system information for optimizing calls to IShellFolder::ParseDisplayName.
+ ///
+ ///
+ /// IFileSystemBindData stores the file system information in a WIN32_FIND_DATA structure. The object that implements
+ /// IFileSystemBindData is then stored in a bind context that is passed to IShellFolder::ParseDisplayName.
+ ///
+ ///
+ /// Implement IFileSystemBindData when you want to optimize calls to IShellFolder::ParseDisplayName and you already have the
+ /// WIN32_FIND_DATA structure's file information available to you.
+ ///
+ ///
+ /// To store the WIN32_FIND_DATA information prior to calling IShellFolder::ParseDisplayName, the client uses the following procedure.
+ ///
+ ///
+ /// -
+ /// Create an instance of the object that exposes the IFileSystemBindData interface.
+ ///
+ /// -
+ /// Use IFileSystemBindData::SetFindData to store the data in the object.
+ ///
+ /// -
+ ///
+ /// Store the object in a bind context through the IBindCtx::RegisterObjectParam method. Set the pszKey parameter to the string and
+ /// the punk parameter to the address of the IFileSystemBindData interface.
+ ///
+ ///
+ ///
+ /// The bind context is then passed with the call to IShellFolder::ParseDisplayName.
+ /// Note Prior to Windows Vista this interface was declared in Shlobj.h.
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ifilesystembinddata
+ [PInvokeData("shobjidl_core.h", MSDNShortId = "f5099bb3-21a7-4708-ac48-d32a14646614")]
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("01E18D10-4D8B-11d2-855D-006008059367")]
- [PInvokeData("Shobjidl.h", MSDNShortId = "bb775671")]
public interface IFileSystemBindData
{
- /// Stores file system information in a WIN32_FIND_DATA structure. This information is used by IShellFolder::ParseDisplayName.
- /// A pointer to the WIN32_FIND_DATA structure that specifies the data you want to store.
- void SetFindData(in WIN32_FIND_DATA pfd);
+ /// Stores file system information in a WIN32_FIND_DATA structure. This information is used by ParseDisplayName.
+ ///
+ /// Type: const WIN32_FIND_DATA*
+ /// A pointer to the WIN32_FIND_DATA structure that specifies the data you want to store.
+ ///
+ ///
+ /// Type: HRESULT
+ /// Always returns S_OK.
+ ///
+ ///
+ /// After the client stores the file information, the instance of the object itself must be stored in a bind context by using the
+ /// IBindCtx::RegisterObjectParam method with the pszKey parameter set to .
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata-setfinddata
+ // HRESULT SetFindData( const WIN32_FIND_DATAW *pfd );
+ [PreserveSig]
+ HRESULT SetFindData(in WIN32_FIND_DATA pfd);
/// Gets the file system information stored in the WIN32_FIND_DATA structure.
- /// A pointer to the WIN32_FIND_DATA structure that receives the data.
- void GetFindData(out WIN32_FIND_DATA pfd);
+ ///
+ /// Type: WIN32_FIND_DATA*
+ /// A pointer to the WIN32_FIND_DATA structure that receives the data.
+ ///
+ ///
+ /// Type: HRESULT
+ /// Returns S_OK.
+ ///
+ ///
+ /// This method provides bind context information to IShellFolder::ParseDisplayName. The client accesses the object by calling
+ /// IBindCtx::GetObjectParam with the pszKey parameter set to the string "File System Bind Data".
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata-getfinddata
+ // HRESULT GetFindData( WIN32_FIND_DATAW *pfd );
+ [PreserveSig]
+ HRESULT GetFindData(out WIN32_FIND_DATA pfd);
}
///
/// Extends IFileSystemBindData, which stores file system information for optimizing calls to IShellFolder::ParseDisplayName. This
/// interface adds the ability set or get file ID or junction class identifier (CLSID).
///
- ///
+ ///
+ /// This interface also provides the methods of the IFileSystemBindData interface, from which it inherits.
+ ///
+ /// To pass the information expressed in this interface to a data source IShellFolder::ParseDisplayName, an IBindCtx object is
+ /// created (use CreateBindCtx) and populated with an object that implements IFileSystemBindData by calling the following:
+ ///
+ /// Where pfsbd is the object that implements IFileSystemBindData.
+ /// Implementers of IShellFolder::ParseDisplayName first make the following call.
+ /// Next the implementer calls one of the Get methods listed above to retrieve the parameters.
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ifilesystembinddata2
+ [PInvokeData("shobjidl_core.h", MSDNShortId = "c9659147-e2b6-4040-b939-42b7efec32d7")]
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("3acf075f-71db-4afa-81f0-3fc4fdf2a5b8")]
- [PInvokeData("Shobjidl.h", MSDNShortId = "bb775660")]
public interface IFileSystemBindData2 : IFileSystemBindData
{
- /// Stores file system information in a WIN32_FIND_DATA structure. This information is used by IShellFolder::ParseDisplayName.
- /// A pointer to the WIN32_FIND_DATA structure that specifies the data you want to store.
- new void SetFindData(in WIN32_FIND_DATA pfd);
+ /// Stores file system information in a WIN32_FIND_DATA structure. This information is used by ParseDisplayName.
+ ///
+ /// Type: const WIN32_FIND_DATA*
+ /// A pointer to the WIN32_FIND_DATA structure that specifies the data you want to store.
+ ///
+ ///
+ /// Type: HRESULT
+ /// Always returns S_OK.
+ ///
+ ///
+ /// After the client stores the file information, the instance of the object itself must be stored in a bind context by using the
+ /// IBindCtx::RegisterObjectParam method with the pszKey parameter set to .
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata-setfinddata
+ // HRESULT SetFindData( const WIN32_FIND_DATAW *pfd );
+ [PreserveSig]
+ new HRESULT SetFindData(in WIN32_FIND_DATA pfd);
/// Gets the file system information stored in the WIN32_FIND_DATA structure.
- /// A pointer to the WIN32_FIND_DATA structure that receives the data.
- new void GetFindData(out WIN32_FIND_DATA pfd);
+ ///
+ /// Type: WIN32_FIND_DATA*
+ /// A pointer to the WIN32_FIND_DATA structure that receives the data.
+ ///
+ ///
+ /// Type: HRESULT
+ /// Returns S_OK.
+ ///
+ ///
+ /// This method provides bind context information to IShellFolder::ParseDisplayName. The client accesses the object by calling
+ /// IBindCtx::GetObjectParam with the pszKey parameter set to the string "File System Bind Data".
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata-getfinddata
+ // HRESULT GetFindData( WIN32_FIND_DATAW *pfd );
+ [PreserveSig]
+ new HRESULT GetFindData(out WIN32_FIND_DATA pfd);
/// Sets the unique file identifier for the current file.
///
+ /// Type: LARGE_INTEGER
+ ///
/// A unique file identifier for the current file. liFileID is a value that is a concatenation of the values nFileIndexHigh and
/// nFileIndexlow, noted in structure _by_handle_file_information.
+ ///
///
- void SetFileID(long liFileID);
+ ///
+ /// Type: HRESULT
+ /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata2-setfileid
+ // HRESULT SetFileID( LARGE_INTEGER liFileID );
+ [PreserveSig]
+ HRESULT SetFileID(long liFileID);
/// Gets the unique file identifier for the current file.
- ///
+ ///
+ /// Type: LARGE_INTEGER*
+ ///
/// When this method returns successfully, receives a pointer to the unique file identifier for the current file. pliFileID is a
/// pointer to a value that is a concatenation of the values nFileIndexHigh and nFileIndexlow, noted in structure _by_handle_file_information.
+ ///
+ ///
+ ///
+ /// Type: HRESULT
+ /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
///
- long GetFileID();
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata2-getfileid
+ // HRESULT GetFileID( LARGE_INTEGER *pliFileID );
+ [PreserveSig]
+ HRESULT GetFileID(out long pliFileID);
///
/// Sets the class identifier (CLSID) of the object that implements IShellFolder, if the current item is a junction point.
///
- /// The CLSID for the object that implements IShellFolder with a junction point as its current item.
- void SetJunctionCLSID(in Guid clsid);
+ ///
+ /// Type: REFCLSID
+ /// The CLSID for the object that implements IShellFolder with a junction point as its current item.
+ ///
+ ///
+ /// Type: HRESULT
+ /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
+ ///
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata2-setjunctionclsid
+ // HRESULT SetJunctionCLSID( REFCLSID clsid );
+ [PreserveSig]
+ HRESULT SetJunctionCLSID(in Guid clsid);
///
/// Gets the class identifier (CLSID) of the object that implements IShellFolder for the item, if the item is a junction point.
///
- ///
+ ///
+ /// Type: CLSID*
+ ///
/// When this method returns successfully, receives a pointer to the CLSID of the object that implements IShellFolder for the
/// current item, if the item is a junction point.
+ ///
+ ///
+ ///
+ /// Type: HRESULT
+ /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
///
- [return: MarshalAs(UnmanagedType.LPStruct)]
- Guid GetJunctionCLSID();
+ // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifilesystembinddata2-getjunctionclsid
+ // HRESULT GetJunctionCLSID( CLSID *pclsid );
+ [PreserveSig]
+ HRESULT GetJunctionCLSID(out Guid pclsid);
}
///