in Education by
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 JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
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

Related questions

0 votes
    Consider a list2 with values 70,60,50. What will be the output statements considering that the above object has ... print(list2*3) Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    I need to parse RFC 3339 strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    I need to parse RFC 3339 strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type. I have found ... best way to do this? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I have a Date object. How do I render the title portion of the following snippet? A couple days ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 15, 2022 in Education by JackTerrance
+1 vote
    How can I modify a conventional natural gas burner to burn biogas?...
asked Oct 12, 2020 in Technology by JackTerrance
0 votes
    In [60]: print(row.index) Int64Index([15], dtype='int64') I already know that the row number is ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 12, 2022 in Education by JackTerrance
0 votes
    Why coal or petrol does not burn by itself in air but once initiated by flame, it continues to burn? Select the correct answer from above options...
asked Jan 4, 2022 in Education by JackTerrance
0 votes
    Does Windows Media Player of Windows 7 allow us to both rip and burn a CD ? Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    State whether the following statements are true or false. Correct the false statements: 1. If the ... ,Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    What are different types of Burn-Down charts?...
asked Jul 18, 2021 in Education by JackTerrance
0 votes
    What is the difference between burn-up and burn-down chart?...
asked Nov 26, 2020 in Technology by Editorial Staff
0 votes
    To bind a row onto an already existing matrix, the ______ function can be used. (a) Rbind (b) Sbnd (c) ... and Out of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    I am having a challenge. I am using Jpos and I am trying to set field 127 sub-element 033 as well as unpacking it. When packing ... isoMsg.getString("127.033")); for (int i = 1; i...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    Which of the following input control represents a date (year, month, day) encoded according to ISO 8601 in Web Form 2.0?...
asked Apr 10, 2021 in Education by JackTerrance
0 votes
    The number of layers in ISO OSI reference model is __________ 5 7 6 10...
asked Jan 10, 2021 in Technology by JackTerrance
...