|
|
@ -1194,16 +1194,6 @@ namespace Avalonia.Win32.Interop |
|
|
public IntPtr hIconSm; |
|
|
public IntPtr hIconSm; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Flags] |
|
|
|
|
|
public enum OpenFileNameFlags |
|
|
|
|
|
{ |
|
|
|
|
|
OFN_ALLOWMULTISELECT = 0x00000200, |
|
|
|
|
|
OFN_EXPLORER = 0x00080000, |
|
|
|
|
|
OFN_HIDEREADONLY = 0x00000004, |
|
|
|
|
|
OFN_NOREADONLYRETURN = 0x00008000, |
|
|
|
|
|
OFN_OVERWRITEPROMPT = 0x00000002 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public enum HRESULT : uint |
|
|
public enum HRESULT : uint |
|
|
{ |
|
|
{ |
|
|
S_FALSE = 0x0001, |
|
|
S_FALSE = 0x0001, |
|
|
@ -1223,7 +1213,7 @@ namespace Avalonia.Win32.Interop |
|
|
public const uint SIGDN_FILESYSPATH = 0x80058000; |
|
|
public const uint SIGDN_FILESYSPATH = 0x80058000; |
|
|
|
|
|
|
|
|
[Flags] |
|
|
[Flags] |
|
|
internal enum FOS : uint |
|
|
public enum FOS : uint |
|
|
{ |
|
|
{ |
|
|
FOS_OVERWRITEPROMPT = 0x00000002, |
|
|
FOS_OVERWRITEPROMPT = 0x00000002, |
|
|
FOS_STRICTFILETYPES = 0x00000004, |
|
|
FOS_STRICTFILETYPES = 0x00000004, |
|
|
@ -1247,135 +1237,246 @@ namespace Avalonia.Win32.Interop |
|
|
FOS_DEFAULTNOMINIMODE = 0x20000000 |
|
|
FOS_DEFAULTNOMINIMODE = 0x20000000 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] |
|
|
public static class ShellIds |
|
|
public struct OpenFileName |
|
|
|
|
|
{ |
|
|
{ |
|
|
public int lStructSize; |
|
|
public static readonly Guid OpenFileDialog = Guid.Parse("DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7"); |
|
|
public IntPtr hwndOwner; |
|
|
public static readonly Guid SaveFileDialog = Guid.Parse("C0B4E2F3-BA21-4773-8DBA-335EC946EB8B"); |
|
|
public IntPtr hInstance; |
|
|
public static readonly Guid IFileDialog = Guid.Parse("42F85136-DB7E-439C-85F1-E4075D135FC8"); |
|
|
public IntPtr lpstrFilter; |
|
|
public static readonly Guid IShellItem = Guid.Parse("43826D1E-E718-42EE-BC55-A1E261C37BFE"); |
|
|
public IntPtr lpstrCustomFilter; |
|
|
} |
|
|
public int nMaxCustFilter; |
|
|
|
|
|
public int nFilterIndex; |
|
|
|
|
|
public IntPtr lpstrFile; |
|
|
|
|
|
public int nMaxFile; |
|
|
|
|
|
public IntPtr lpstrFileTitle; |
|
|
|
|
|
public int nMaxFileTitle; |
|
|
|
|
|
public IntPtr lpstrInitialDir; |
|
|
|
|
|
public IntPtr lpstrTitle; |
|
|
|
|
|
public OpenFileNameFlags Flags; |
|
|
|
|
|
private readonly ushort Unused; |
|
|
|
|
|
private readonly ushort Unused2; |
|
|
|
|
|
public IntPtr lpstrDefExt; |
|
|
|
|
|
public IntPtr lCustData; |
|
|
|
|
|
public IntPtr lpfnHook; |
|
|
|
|
|
public IntPtr lpTemplateName; |
|
|
|
|
|
public IntPtr reservedPtr; |
|
|
|
|
|
public int reservedInt; |
|
|
|
|
|
public int flagsEx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ComImport(), Guid("42F85136-DB7E-439C-85F1-E4075D135FC8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
[ComImport(), Guid("42F85136-DB7E-439C-85F1-E4075D135FC8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
internal interface IFileDialog |
|
|
public interface IFileDialog |
|
|
{ |
|
|
{ |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[PreserveSig()] |
|
|
[PreserveSig()] |
|
|
uint Show([In, Optional] IntPtr hwndOwner); //IModalWindow
|
|
|
uint Show([In, Optional] IntPtr hwndOwner); //IModalWindow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFileTypes([In] uint cFileTypes, [In, MarshalAs(UnmanagedType.LPArray)] IntPtr rgFilterSpec); |
|
|
uint SetFileTypes(uint cFileTypes, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] COMDLG_FILTERSPEC[] rgFilterSpec); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFileTypeIndex([In] uint iFileType); |
|
|
uint SetFileTypeIndex([In] uint iFileType); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetFileTypeIndex(out uint piFileType); |
|
|
uint GetFileTypeIndex(out uint piFileType); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint Advise([In, MarshalAs(UnmanagedType.Interface)] IntPtr pfde, out uint pdwCookie); |
|
|
uint Advise([In, MarshalAs(UnmanagedType.Interface)] IntPtr pfde, out uint pdwCookie); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint Unadvise([In] uint dwCookie); |
|
|
uint Unadvise([In] uint dwCookie); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetOptions([In] uint fos); |
|
|
uint SetOptions([In] uint fos); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetOptions(out uint fos); |
|
|
uint GetOptions(out uint fos); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
uint SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
uint GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
uint GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); |
|
|
uint SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); |
|
|
uint GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); |
|
|
uint SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); |
|
|
uint SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); |
|
|
uint SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
uint GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, uint fdap); |
|
|
uint AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, uint fdap); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); |
|
|
uint SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint Close([MarshalAs(UnmanagedType.Error)] uint hr); |
|
|
uint Close([MarshalAs(UnmanagedType.Error)] uint hr); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetClientGuid([In] ref Guid guid); |
|
|
uint SetClientGuid([In] ref Guid guid); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint ClearClientData(); |
|
|
uint ClearClientData(); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); |
|
|
uint SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ComImport, Guid("d57c7288-d4ad-4768-be02-9d969532d960"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
|
|
|
public interface IFileOpenDialog |
|
|
|
|
|
{ |
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
[PreserveSig()] |
|
|
|
|
|
uint Show([In, Optional] IntPtr hwndOwner); //IModalWindow
|
|
|
|
|
|
|
|
|
[ComImport, Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
internal interface IShellItem |
|
|
uint SetFileTypes([In] uint cFileTypes, [In, MarshalAs(UnmanagedType.LPArray)] IntPtr rgFilterSpec); |
|
|
{ |
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint BindToHandler([In] IntPtr pbc, [In] ref Guid rbhid, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IntPtr ppvOut); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetParent([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
void SetFileTypeIndex([In] uint iFileType); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetDisplayName([In] uint sigdnName, out IntPtr ppszName); |
|
|
void GetFileTypeIndex(out uint piFileType); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint GetAttributes([In] uint sfgaoMask, out uint psfgaoAttribs); |
|
|
uint Advise([In, MarshalAs(UnmanagedType.Interface)] IntPtr pfde, out uint pdwCookie); |
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
uint Compare([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, [In] uint hint, out int piOrder); |
|
|
void Unadvise([In] uint dwCookie); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint SetOptions([In] uint fos); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint GetOptions(out uint fos); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, uint fdap); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void Close([MarshalAs(UnmanagedType.Error)] int hr); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetClientGuid([In] ref Guid guid); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void ClearClientData(); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetResults([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppenum); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetSelectedItems([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppsai); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ComImport, Guid("B63EA76D-1F85-456F-A19C-48159EFA858B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
|
|
|
public interface IShellItemArray |
|
|
|
|
|
{ |
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void BindToHandler([In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, [In] ref Guid rbhid, |
|
|
|
|
|
[In] ref Guid riid, out IntPtr ppvOut); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetPropertyStore([In] int Flags, [In] ref Guid riid, out IntPtr ppv); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetPropertyDescriptionList([In] ref PROPERTYKEY keyType, [In] ref Guid riid, out IntPtr ppv); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetAttributes([In] SIATTRIBFLAGS dwAttribFlags, [In] uint sfgaoMask, out uint psfgaoAttribs); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetCount(out uint pdwNumItems); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void GetItemAt([In] uint dwIndex, [MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
void EnumItems([MarshalAs(UnmanagedType.Interface)] out IntPtr ppenumShellItems); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 4)] |
|
|
|
|
|
public struct PROPERTYKEY |
|
|
|
|
|
{ |
|
|
|
|
|
public Guid fmtid; |
|
|
|
|
|
public uint pid; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public enum SIATTRIBFLAGS |
|
|
|
|
|
{ |
|
|
|
|
|
SIATTRIBFLAGS_AND = 1, |
|
|
|
|
|
SIATTRIBFLAGS_APPCOMPAT = 3, |
|
|
|
|
|
SIATTRIBFLAGS_OR = 2 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ComImport, Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
|
|
|
|
|
public interface IShellItem |
|
|
|
|
|
{ |
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint BindToHandler([In] IntPtr pbc, [In] ref Guid rbhid, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IntPtr ppvOut); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint GetParent([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint GetDisplayName([In] uint sigdnName, out IntPtr ppszName); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint GetAttributes([In] uint sfgaoMask, out uint psfgaoAttribs); |
|
|
|
|
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] |
|
|
|
|
|
uint Compare([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, [In] uint hint, out int piOrder); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] |
|
|
|
|
|
public struct COMDLG_FILTERSPEC |
|
|
|
|
|
{ |
|
|
|
|
|
[MarshalAs(UnmanagedType.LPWStr)] |
|
|
|
|
|
public string pszName; |
|
|
|
|
|
[MarshalAs(UnmanagedType.LPWStr)] |
|
|
|
|
|
public string pszSpec; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Flags] |
|
|
[Flags] |
|
|
internal enum DropEffect : int |
|
|
internal enum DropEffect : int |
|
|
{ |
|
|
{ |
|
|
|