Hi,
Anyone knows how burn a CD using the Windows API (should works in XP and Vista)?
Thanks,
Marcos Douglas

Mailing lists / fpc-pascal / 2012-03
15 messages · 6 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
Anyone knows how burn a CD using the Windows API (should works in XP and Vista)?
Thanks,
Marcos Douglas
you should :
1 - Learn to use ASPI.dll (wich is basically a way to send ATAPI commands to the device).
2 - Learn ATAPI commands (ATAPI is more or less SCSI commands sent over SATA/PATA layer).
2012/3/13 Marcos Douglas :
you are lucky !
a quick search at google returned the following document :
http://tools.assembla.com/svn/zalex/FuzzyReader/WNaspi32.pas
i dont know the license of this code, but it can be used, at least, as reference...
2012/3/13 Jorge Aldo G. de F. Junior :
Anyone knows how burn a CD using the Windows API (should works in XP and Vista)? Marcos…
W dniu 13.03.2012 14:13, Marcos Douglas pisze:
Hi, Anyone knows how burn a CD using the Windows API (should works in XP and Vista)?
Take a look at:
http://blog.delphi-jedi.net/2009/07/18/im-burning-baby/
Porting to FPC/Lazarus (if any) should be straightforward.
stootch
If you think in the future your app must work in another OSes, maybe a better solution is to use cdrecord, it has everything you need (CD, DVD, BluRay) . Here's the Win32 version http://www.student.tugraz.at/thomas.plank/
We run it using TProcess, then parse the results and show them on screen.
Leonardo M. Ramé
http://leonardorame.blogspot.com
you are lucky ! a quick search at google returned the following document :…
Well, thanks... but I want something already works with FPC, if is possible.
I do not know what I can do with this code. There are just 4 procedures/funcition...
Marcos Douglas
W dniu 13.03.2012 14:13, Marcos Douglas pisze: Take a look at:…
Yeah, I saw this before. This code uses JEDI so, maybe works with \packages\winunits-jedi\src sources.
Marcos Douglas
If you think in the future your app must work in another OSes, maybe a better solution is…
Interesting. Could you give an example how do you use it, please? You do not translated the headers, just use the binaries, rigth?
Marcos Douglas
cdrecord is generally well-regarded in terms of the number of different drives etc. it supports, but I've always found (on Linux) that it needs a bit of nursing when scanning and selecting available devices. Also there are issues with e.g. Debian forking the project and applying patches which weren't approved by the original author.
Frankly, I think that I'd settle for building a .iso image, and rely on the user having his own software which is known to be compatible with his hardware.
Interesting. Could you give an example how do you use it, please? You do not translated…
----- Original Message -----
I don't have a small example, but basically the process is very simple.
First, you need to create an ISO image with mkisofs, part of the CDRtools bundle, then use "cdrecord -scanbus" to get a list of drives, and the last step is to use cdrecord to burn the ISO image into the drive.
Regarding the 2nd question, I just use the binaries.
Leonardo M. Ramé
http://leonardorame.blogspot.com
I will try.
Thanks for these tips.
Marcos Douglas
----- Original Message ----- I don't have a small example, but basically the process is…
Today I'm back to this problem.
I downloaded the CDRtools (it need cygwin too).
I burned the files on the CD-R... very good!
But I still have a problem:
The CD or DVD will have many files so, recording may take much time. How do you show to user the progress?
Marcos Douglas
CDRtfe is a gui front-end for cdrecord written in Delphi. You can find the sources here http://cdrtfe.sourceforge.net/cdrtfe/source_en.html. I appears they show the output of cdrecord in a TMemo. When you launch cdrecord with -v you get the progress in %.
Ludo
I will see, thanks.
To read the Output, I think is better to use this tutorial: http://wiki.lazarus.freepascal.org/Executing_External_Programs#Reading_large_output
Marcos Douglas
I will see, thanks. To read the Output, I think is better to use this tutorial: http://wiki.lazarus.freepascal.org/Executing_External_Programs
#Reading_large_output
Yes. You want to read the output continuously and display it as soon as there is new data.
Ludo