Anyone able to convert code to programmatically burn CD/DVD?

Anyone able to convert code to programmatically burn CD/DVD?

Postby hua » Wed Jul 11, 2012 3:39 am

Can anyone convert this code for use in FWH?

Able to programmatically burn to CD/DVD would be a very nice feature to have eventhough it's only available from XP onwards.
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Anyone able to convert code to programmatically burn CD/DVD?

Postby ukoenig » Thu Jul 12, 2012 12:51 pm

Hua,

it would be a hard job, writing a CD-burner-app.

I found a useful freeware, because of possible COMMANDLINE-options to burn from inside a FWH-app.

Image

Download
http://www.burnaware.com

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Anyone able to convert code to programmatically burn CD/DVD?

Postby hua » Thu Jul 12, 2012 12:55 pm

Thanks for the reply Uwe. It's just that some customers want to be able to backup directly to a CD hence my research into this area
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Anyone able to convert code to programmatically burn CD/DVD?

Postby StefanHaupt » Fri Jul 13, 2012 7:10 am

Hua,

for XP there is a dll to burn out of fwh, it´s called xpBurnObj. But it´s no more working with vista and Win 7. :(

Download here http://www.bayden.com/delphi/cdburner.htm

Code: Select all  Expand view
//****
FUNCTION BurnCDInXP()
//****
LOCAL cBurnPath
//
IF ( oCD := XPBurnObj() ) != NIL )
   oFSO := CreateObject( "Scripting.FileSystemObject" ) // If we get here we're in XP and this shouldn't fail...
   //
   WITH OBJECT ( oCD )
      :ClearFiles()                                     // Erases ALL files from burning area...
      //
      MakeDir( cBurnPath := ( :BurnArea + "\Backup" ) ) // Build your directory structure...
      MakeDir( cBurnPath += "\companyname" )
      //
      :AddFile( "c:\yourfile.ext" )                     // This method add the file to the root of the CD..
      oFSO:CopyFile( "u:\yourfile.zip", cBurnPath + "\backup.ext" )
                                                        // Copy to the directory you just created...
      //
      :StartBurn()                                      // Invokes the XP Burning wizard...
   END
ENDIF
//
RETURN (.T.)

//***
FUNCTION XPBurnObj()
//***
   LOCAL oBurn
   //
   IF Os_IsWinXP()
      TRY
         oBurn := CreateObject( "BaydenBurn.XPBurn" )
         IF !( oBurn:Equipped )
            oBurn := NIL
         ENDIF
      CATCH
      END
   ENDIF
   //
   RETURN ( oBurn )
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Anyone able to convert code to programmatically burn CD/DVD?

Postby hua » Fri Jul 13, 2012 7:16 am

Thanks for the reply Stefan. I'm now looking into scripting + IMAPIv2.

If I could get that down, I'd be able to do it on PCs with XP SP2 up to Win 7, hopefully :)
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Anyone able to convert code to programmatically burn CD/DVD?

Postby Eoeo » Fri Jul 13, 2012 9:40 am

Dear stephan
????
User avatar
Eoeo
 
Posts: 222
Joined: Mon Jun 04, 2012 12:00 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests