Open MercuryVN opened 3 months ago
after a bit of digging, I think that I shouldn't move
[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);
so I reverse it and now it throw another error: Value does not fall within the expected range at dialog.GetResults(out var items);
Hello @MercuryVN , look at this solution https://stackoverflow.com/questions/11624298/how-do-i-use-openfiledialog-to-select-a-folder/66187224#66187224 It's seems works fine! I've checked with folders and files.
I see no option to pick multiple files, and I know next to nothing about what is going on here, I tried to modify the project as follow: create a new file FileMultiPicker.cs
in Helper.cs, add
move from IFileOpenDialog.cs to IFileDialog.cs
the code run, but at
dialog.GetResults(out var items);
, it returns null as if no file was selected if I could get some help or pointed to a right direction I would appreciate it