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.
//****
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 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 93 guests