Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6965089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:00:31+00:00 2026-05-27T16:00:31+00:00

I have read hackchina and codeproject examples but it seems I can not figure

  • 0

I have read hackchina and codeproject examples but it seems I can not figure out how to burn an existing .iso file. The examples above show ways of making an .iso from a folder and then burning it. I want to be able to directly burn an iso file.

Here is some code:

IDiscRecorder2 discRecorder = new MsftDiscRecorder2();
string Burner = comboBox1.SelectedItem.ToString();

foreach (DrvProperties prop in drv_props)
{
  if (prop.letter.Contains(Burner)) // letter contains the drive's Letter (E:, G: etc.)
  {
    discRecorder.InitializeDiscRecorder(prop.ID); // ID contains drive's uniqueID
  }

}

IDiscFormat2Data discFormatData = new MsftDiscFormat2Data();
discFormatData.Recorder = discRecorder;

IMAPI_MEDIA_PHYSICAL_TYPE mediaType = discFormatData.CurrentPhysicalMediaType;
......
......

Could someone please help me get further? Lets say I have example.iso. What should I do now? I don’t understand. (I got using IMAPI2.interop in my code from CodeProject example).

Thanks a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:00:32+00:00Added an answer on May 27, 2026 at 4:00 pm

    Well i finally figured it out firstly you need to include the following name spaces:

    using System.Runtime.InteropServices;
    using System.Runtime.InteropServices.ComTypes;
    

    In order to be able to use IStream.

    Then you need to import SHCreateStreamOnFIle from shlwapi.dll to open a “read stream” to that iso:

    private const uint STGM_SHARE_DENY_WRITE = 0x00000020;
        private const uint STGM_SHARE_DENY_NONE = 0x00000040;
        private const uint STGM_READ = 0x00000000;
        private const uint STGM_WRITE = 0x00000001;
        private const uint STGM_READWRITE = 0x00000002;
    
         [DllImport("shlwapi.dll", CharSet = CharSet.Unicode, ExactSpelling = true,    PreserveSig = false, EntryPoint = "SHCreateStreamOnFileW")]
        static extern void SHCreateStreamOnFile(string fileName, uint mode, ref IStream stream);
    
    IStream stream = null;
    SHCreateStreamOnFile(path2iso, STGM_READ | STGM_SHARE_DENY_WRITE, ref stream);
    

    and finally supply i to the discFormatData.Write() method.

    discFormatData.Write(stream);
    

    I hope it helps someone. Take care

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read quite a lot of R docs, but I can't find anything
I have read a lot, but still i can't find the point that i
I have read a lot that LISP can redefine syntax on the fly, presumably
I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can
I have read in some of the ClickOnce posts that ClickOnce does not allow
I have read about Java Reflections but till date it has been a vague
I have read somewhere that using the class instances as below is not a
I have read through this SO question about 32-bits, but what about 64-bit numbers?
I have read some topic regarding with my question but there code doesn't work
I have read some questions on this around here but my tries at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.