FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Anyone able to convert code to programmatically burn CD/DVD?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Anyone able to convert code to programmatically burn CD/DVD?
Posted: Wed Jul 11, 2012 03: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Anyone able to convert code to programmatically burn CD/DVD?
Posted: 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.



Download
http://www.burnaware.com

Best Regards
Uwe :-)
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.
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Anyone able to convert code to programmatically burn CD/DVD?
Posted: 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
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Anyone able to convert code to programmatically burn CD/DVD?
Posted: Fri Jul 13, 2012 07: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 (fw): Select all Collapse
//****
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
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Anyone able to convert code to programmatically burn CD/DVD?
Posted: Fri Jul 13, 2012 07: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
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM
Re: Anyone able to convert code to programmatically burn CD/DVD?
Posted: Fri Jul 13, 2012 09:40 AM

Dear stephan
????

Continue the discussion