Search code examples
c#c++.netopenfiledialog

Converting C++ project to a DLL to use in C# application


I've been searching around for days for a custom .NET control that can select multiple files and multiple folders all at once.

The only one I have found to be exactly what i'm looking for is the one below, but it's written in C++.

https://www.codeproject.com/Articles/28015/SelectDialog-A-Multiple-File-and-Folder-Select-Dia

Can anyone please tell me how I can get it to work in my C# application? Either as a DLL reference or just including the project in my current solution.

I tried to compile it as an unmanaged DLL and then do a DLLImport from my C# project but couldn't get it working.

Thanks in advance.


Solution

  • I ended up creating my own custom form using the Windows API Code Pack's ExplorerBrowser. It looks just like the OpenFileDialog but you can select multiple files and folders all at the same time.

    I've not seen anyone do this yet so I might post an article somewhere about it later...

    Thanks for your suggestions.