As you may know Windows Explorer allows to mount ISO files to a virtual drive. Is there any API which can be used to do this?
The native function call AttachVirtualDisk.
However, if you are using C# like your tags suggest it may be easier to just call out to PowerShell and use its wrapper around that function Mount-DiskImage
using System.Management.Automation;
namespace IsoMountTest
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var isoPath = @"C:\Foo\bar.iso";
            using (var ps = PowerShell.Create())
            {
                ps.AddCommand("Mount-DiskImage").AddParameter("ImagePath", isoPath).Invoke();
            }
        }
    }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With