ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / CD and DVD burning functions
  • Deleting files from a CD
BurnerErase (Example)
Deleting files from a CD
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax The following example is used to erase the files found on the CD. The burner door will automatically opened at the end of the erase process. The "ProcCDErase" procedure is regularly called during the erase process. The parameters of this procedure are automatically filled.
// Entirely erase the files found on CD
// The burner door will automatically opened at the end of erase process
ResErase is boolean
ResErase = BurnerErase(burnerFullErasing + burnerAutoEject, ProcCDErase)
// Error occurred?
IF ResErase = False THEN
// Display the error
Error(ErrorInfo(errMessage))
ELSE
// Erase process started
Info("The files are going to be deleted from the CD")
END
// -- Procedure ProcCDErase
// This procedure is regularly called during the erase process
// The parameters are automatically filled
PROCEDURE ProcCDErase(EraseStatus, EraseMessage, Param1)
// Event that occurred?
SWITCH EraseStatus
// The erase process was canceled
CASE burnerNotificationCancel
IF YesNo("Do you want to cancel the erase operation?") THEN
RETURN True
END
RESULT False
 
// Error detected
CASE burnerNotificationError
Error("An error occurred", EraseMessage)
 
// Erase operation completed
CASE burnerNotificationEndErasing
IF Param1 = 0 THEN
Info("The CD was erased")
ELSE
Error("Error during the erase operation " + EraseMessage)
END
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