?
Solved

Burn .ISO image stream to a disc

Posted on 2008-11-03
15
Medium Priority
?
1,137 Views
Last Modified: 2008-11-10
Hello,

I'm curious if there is a solution where I could burn a .iso image STREAM (not just a file) to disc. The complicated part of task is that I need to tweak certain bytes in the original ISO file and then send it to disc for burn. Ideally the work flow I'm looking at is as follows

1 open the ISO file for read
2 Read N bytes from the file
3 Tweak some bytes
4 Send to disc for burn
5 Repeat from step 2 until end of the file

Since time is of essence in this app, I cant afford to tweak data first and then burn it.

I'm familiar with Microsoft's IMAPIv2 but it cannot help get through this. Any ideas???

Thanks.
0
Comment
Question by:kk8
  • 8
  • 4
  • 3
15 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 22879342
You can write the ISO image via 'IDiscFormat2Data::Write()', given that you openend the file as an IStream. See the article at http://www.codeproject.com/KB/cs/IsoBurner.aspx ("How to Burn Optical File Images with IMAPI 2.0 from Managed Cod") for more info on that, even though it's C#, you should be able to locat the interfaces used quite easily.
0
 

Author Comment

by:kk8
ID: 22879706
One could assign a ISO file to IStream and Write function can burn the entire file for you. But I dont think this will serve the purpose, I cant change data buffered through IStream. Check this out.
http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=1807966&SiteID=1
0
 
LVL 86

Expert Comment

by:jkr
ID: 22879806
Well, I thought the idea was to alter the file and then burn it - should work better than doing it on the fly...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kk8
ID: 22890890
As I have mentioned in the original thread, I must achieve this on the fly for efficiency reasons. I cant afford to split this into 2 steps.
0
 
LVL 86

Expert Comment

by:jkr
ID: 22897207
Hm, what about providing your own implementation of IStream that wraps the functionality of the original one?
0
 

Author Comment

by:kk8
ID: 22897764
no not a good idea
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22900096
If writing a new copy of the ISO is not an option, what about tweaking the ISO in place?  
Just keep a record of each change you make and then burn the whole thing, then change it back.
0
 

Author Comment

by:kk8
ID: 22900246
This 2 step process of modifying ISO first and then burning it on the disc is time consuming. I want to combine these two steps to save time.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22900997
I can understand that objection when it comes to copying a 700MB file.  
But it sounded like you are talking about making a few minor changes at a few specific places in the ISO (for instance, burning a unique identifier on the disk).  If so, my suggestion will cost a few milliseconds.  That's hardly something that your user will notice.
0
 

Author Comment

by:kk8
ID: 22901046
Its not 700 MB and its not few milliseconds that we have here. You could assume 2 step process isnt what i'm looking for.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22901178
In that case, I'm down with with jkr's suggestion:  Write an implementation of IStream that does what you want it to do.  Your version will make the changes on the fly, and the IMAPIv2 handler will see the simple stream of data that it expects, but it will be the data that you have tweaked on the fly.
0
 

Author Comment

by:kk8
ID: 22901225
Go thru this http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=1807966&SiteID=1 

MSFT engineer says its not a good idea. Although i'm interested in such implemented if you could make the snippet available for me.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 1500 total points
ID: 22901394
It seems that the IMAPIv2 samples incoludes such an IStream wrapper.  There was a copy of it in the source poinyed to by one of the posters in that forum:
   http://www.codeplex.com/ImageMaster/SourceControl/ListDownloadableCommits.aspx
The file is named AStream.cs
>> Its not 700 MB and its not few milliseconds that we have here.
It might help is you told us what it is rather than what it is not.. Thanks.
0
 

Author Comment

by:kk8
ID: 22901478
That info is meant to be confidential but I can tell you that the size we are talking could be a 100GBytes. AStream.cs could come handy for my project. Thanks for that, at least it will help to explore more possibilities.
0
 

Author Comment

by:kk8
ID: 22926148
k
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question