Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to burn a multi-session CDR with Nero

Posted on 2005-04-20
11
Medium Priority
?
1,059 Views
Last Modified: 2009-07-29
I would appreciate some direct help in adding the Nero API to my project..  I need to be able to write files to a CDR.  The code needs to recognize that the CD is still open and available for additional writing.

I downloaded the method at http://www.bayden.com/delphi/cdburner.htm and got that to work.  EXCEPT that it won't recognize the CD as writable.  It gives me a message that there is no disk in the burner.  Nero sees it and and Click-n-Burn does too, but not the Bayden method.

I own Nero 6 and I've searched all over and read over the Nero SDK documentation.  But I am not skilled enough to translate what is given to VB code.

Can someone who has done it post the code and calls you used to make this work?  Or some other method.  I'm not married to Nero, it just appears that it may be the best of what is available and I own it.

Thanks in advance.
0
Comment
Question by:Skip_Laughlin
  • 4
  • 3
  • 2
9 Comments
 

Accepted Solution

by:
bkdar earned 1000 total points
ID: 13837000
Skip,

I can supply you with the full project I just finished making for an end-user here at my office. It is in VB6 and uses the XPBurnOBJ.dll from Bayden. I can post my code here OR I can e-mail it to you and that will give you forms and modules etc. It is fairly well documented and since I just went through all kinds of pain figuring it out I should still be fresh enough to help you.

Respectfully,
Brian

e-mail addresses are younwhastudent@comcast.net OR bharvey@bkd.com
0
 

Author Comment

by:Skip_Laughlin
ID: 13858922
I sent you my email.  Sorry for the delay, I've been away.
0
 

Expert Comment

by:bkdar
ID: 13862868
No problem,

I sent you the source code from my work e-mail address
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:GPrentice00
ID: 14374636
use of off-site communications towards the problem
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 14405147
Skip_Laughlin

You've just countered every point from the Cleanup Admin posting above with the re-acceptance of the comment, and made the elgance of the phrase "IF this question is closed again disrespecting this posting" stand out as one that I hope AnnieMod is able to patent.

0
 

Author Comment

by:Skip_Laughlin
ID: 14405277
Sorry, I didn't even read the comments.  I thought, well, I need to close up this old question, so the moderator won't have to deal with it.  I thought I had managed to close it the other day, then today it wasn't closed.  I thought something was awry, so I Accepted it again.  My humble apology.  I am working to rectify this ASAP.

0
 

Author Comment

by:Skip_Laughlin
ID: 14405291
Here's the guts of the code that makes this happen.  Please let me know if this is not satisfactory.

Option Explicit
Dim foo As Object   ' must declare this variable in module declarations scope (not inside a sub)
Dim PauseTime, Start, Finish, TotalTime
Dim FSO As New FileSystemObject
Dim burnfile As String
Private Sub Command1_Click()
On Error GoTo Remdir
           
MakeDir:
' The MakDir sub-routine creates the temorary folders used to burn the CD-R
' compilation. The FSO file object is called from the Microsoft Scripting
' Runtime Library which can be found under Project - References - Microsoft
' Scripting Runtime. The StatusBar1 code is simply an add on feature to show
' where in the setup for burning the application is. The code from PauseTime
' down to the TotalTime is a simple delay to allow the end user to read the
' messages displayed by the StatusBar1.

    FSO.CreateFolder "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CD Burning" ' creates the folder to burn files from
    FSO.CreateFolder "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CD Burning\VALUATION"
    StatusBar1.Panels(1).Text = "Creating new directory" 'notification of status
    PauseTime = 1   ' Set duration.                   ********************************
    Start = Timer   ' Set start time.                 *  This creates a short time   *
    Do While Timer < Start + PauseTime '              *  delay for status messages   *
    Loop '                                            *                              *
    Finish = Timer   ' Set end time.                  *                              *
    TotalTime = Finish - Start   ' Calculate total time. ********************************
    TotalTime = Finish - Start   ' Calculate total time.
    StatusBar1.Panels(1).Text = "Created new directory" 'notification of status
    GoTo Continue

' The Remdir sub-routine deletes the temorary folders used to burn the CD-R
' compilation. This ensures a clean burn with no residual data from a previous
' session. The FSO file object is called from the Microsoft Scripting Runtime
' Library which can be found under Project - References - Microsoft Scripting
' Runtime. The StatusBar1 code is simply an add on feature to show where in the
' setup for burning the application is. The code from PauseTime down to the
' TotalTime is a simple delay to allow the end user to read the messages
' displayed by the StatusBar1. It then sends control to the MkDir sub-routine.
Remdir:
    FSO.DeleteFolder "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CD Burning", True
    StatusBar1.Panels(1).Text = "Deleting old directory" 'notification of status
    PauseTime = 1   ' Set duration.                   ********************************
    Start = Timer   ' Set start time.                 *  This creates a short time   *
    Do While Timer < Start + PauseTime '              *  delay for status messages   *
    Loop '                                            *                              *
    Finish = Timer   ' Set end time.                  *                              *
    TotalTime = Finish - Start   ' Calculate total time. ********************************
    StatusBar1.Panels(1).Text = "Finished deleting old directory" 'notification of status
    GoTo MakeDir

' The Continue sub-routine follows the same pattern as the MkDir and Remdir sub-routines.
' The differences are outlined here. FSO.CopyFolder uses the FileSystem Object to copy
' a static and common set of folders to the temp folder for burning. The FSO.CopyFile
' copies the string value of burnfile and places it in the temp folder for burning and
' also as a redundancy ensures the file name remains the same as it was in the BKDValuation
' form. After all files have been copied it passes control to the BurnNow sub-routine.
Continue:
    StatusBar1.Panels(1).Text = "Copying the base files for Valuation compilation" 'notification of status
    FSO.CopyFolder "Y:\Installs\BKD Plan Admin Demoshield Design files\Copy These to CD", "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CD Burning"
    StatusBar1.Panels(1).Text = "Completed copying the base files for Valuation compilation" 'notification of status
    StatusBar1.Panels(1).Text = "Copying the Valuation file" 'notification of status
    FSO.CopyFile burnfile, "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CD Burning\Valuation\" & finalitempath
    StatusBar1.Panels(1).Text = "Completed copying the Valuation file" 'notification of status
    GoTo BurnNow

' The BurnNow subroutine actually burns the CD from the files in the temp folder for burning.
BurnNow:

    Set foo = CreateObject("BaydenBurn.XPBurn")
    StatusBar1.Panels(1).Text = "Status: Starting CD Burn"
    foo.StartBurn
End Sub
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 14405327
Thanks Skip - that SHOULD take care of things I would think.
0
 

Author Comment

by:Skip_Laughlin
ID: 14405339
Thanks and thanks for smacking me so I could wake up and look around.
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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

564 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