ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / CD and DVD burning functions
  • Burning a data CD
  • Burning an audio CD
BurnerAddDirectory (Example)
Burning a data CD
The following example is used to add the files found in a directory into the compilation (data CD).
// Burn a data CD
BurnerMediaType(mediaType_CD_ROM_XA)
// Add the files found in "C:\MyDirectory"
// The ProcAddFile procedure will be automatically called for each added file
ResAdd is boolean
ResAdd = BurnerAddDirectory("C:\MyDirectory", "", ProcAddFile)
// Error occurred?
IF ResAdd = False THEN
  // Display the error
  Error(ErrorInfo(errMessage))
ELSE
  // Burn the CD
  BurnerSave()
END
// -- Procedure ProcAddFile
// This procedure is called for each added file
// FileDir contains the directory of the added file
// FileName contains the name of the added file
// These parameters are automatically filled
PROCEDURE ProcAddFile(FileDir, FileName)
// Display the file that is currently added in "STC_CurrentFile"
STC_CurrentFile = "File currently added: " + FileDir + FileName
// Add the current file into the compilation
// and continue to list the files
RESULT 1
Burning an audio CD
The following example is used to add the files found in a directory into the compilation (audio CD).
// Burn an audio CD
BurnerMediaType(mediaType_CDDA_CDROM)
// Add the ".WAV" files found in the "C:\MyMusic" directory
ResAdd is boolean
ResAdd = BurnerAddDirectory("C:\MyMusic\*.WAV")  
// Error occurred?
IF ResAdd = False THEN
// Display the error
Error(ErrorInfo(errMessage))
ELSE
// Burn the CD
BurnerSave()
END
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help