AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de grabación de CD y DVD
  • Procedure for handling each added file
  • Taking the listed files into account
  • Compilation
  • Adding several identical files
  • Required configuration
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds all the files found in a directory to the compilation. Once all the desired files have been added to the compilation, the CD or DVD can be burned (BurnerSave).
For each added file, BurnerAddDirectory automatically calls a specific procedure written in WLanguage. This procedure is used to handle the current file.
Remark: To add a file to the compilation, use the BurnerAddFile function.
WINDEVReportes y ConsultasCódigo de Usuario (UMC)
// Burn a data CD 
BurnerMediaType(mediaType_CD_ROM_XA) 
// Add the files located in "C:\MyDirectory" and in its subdirectories
// The addition can be interrupted by pressing the Esc key
ResAdd is boolean 
ResAdd = BurnerAddDirectory("C:\MyDirectory", ...
	burnerRecursiveAddition + burnerInterruptibleAddition)
// 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)
// To view the entire example, click the "Example" link
// Burn an audio CD
BurnerMediaType(mediaType_CDDA_CDROM) 
// Add the ".WAV" files found in "C:\MyMusic"
ResAdd is boolean 
ResAdd = BurnerAddDirectory("C:\MyMusic\*.WAV")  
// To view the entire example, click the "Example" link
Sintaxis
<Result> = BurnerAddDirectory(<Directory to add> [, <Directory on CD or DVD> [, <WLanguage procedure> [, <Pointer>]]] [, <Options>])
<Result>: Boolean
  • True if the files found in the directory have been added to the compilation,
  • False otherwise. To get more details on the error, use ErrorInfo.
Note: A CD or DVD must be present in the recorder.. This CD or DVD must have enough space to burn a new session.
<Directory to add>: Character string
Path and generic name of the files that will be added to the compilation (up to 260 characters). A full path, a relative path or a UNC path can be used.
Generic characters (* and?) are allowed.
For an audio compilation, these files must correspond to ".WAV" file (44100 Hz, 16 bits).
WEBDEV - Código Servidor The path of the directory is relative to the Web server.
<Directory on CD or DVD>: Optional character string
Path of directory on the CD or DVD. This path must start with a backslash character ("\"). By default, the tree structure of the directory will be recreated from the root of the CD/DVD.
This parameter is ignored for an audio compilation. Indeed, all the files will be automatically added at the root of the CD/DVD.
<WLanguage procedure>: Name of optional procedure
Name of WLanguage procedure ("callback") called for each file added. This procedure is used to handle the current file.
This procedure has the following format:
PROCEDURE <Procedure name>(<Path>, <File name>, <Change>,
<Procedure pointer>)

The parameters of this procedure are optional.
There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled whenever a file is processed.
The file will be added (or not) to the compilation according to the value returned by this procedure (see the Notes).
<Pointer>: Optional integer
Pointer passed to <Procedure name>.
<Options>: Combination of Integer constants, optional parameter
Type of browse performed to add the files found in the directories:
burnerInterruptibleAdditionThe iteration can be interrupted by pressing ESC.
WEBDEV - Código Servidor This constant has no effect.
burnerNonRecursiveAdditionThe iteration is non-recursive. Subdirectories are ignored.
burnerRecursiveAddition
(Default value)
The iteration is recursive. Subdirectories are automatically taken into account.
Observaciones

Procedure for handling each added file

For each added file, BurnerAddDirectory automatically calls the <Procedure name> procedure. This procedure is a local or global procedure.
This procedure must be declared as follows:
PROCEDURE <Procedure name> (<Path>, <File name>, <Change>, <Procedure pointer>)
  • <Path> is the path of file used (it always ends with a "\" character; "C:Files\" for example).
  • <File name> is a character string containing the name of file found.
  • <Change> is a constant set to:
    • flFirstFile when the file is the first file listed in <Path>,
    • flChangeDir when the file is the first file listed in a subdirectory of <Path> (which means that the directory has changed),
    • flFile in all the other cases.
    The different values that can be taken by <Change> are as follows:
    Current file<Change>
    Dir\File 1flFirstFile
    Dir\File nflFile
    Dir\SubDir 1\File 1flChangeDir
    Dir\SubDir 1\File mflFile
    Dir\SubDir 2\File 1flChangeDir
    Dir\SubDir 2\File xflFile
  • <Procedure pointer> is an integer whose value is the one passed to the <Pointer> parameter of BurnerAddDirectory. If <Pointer> is not specified, <Pointer> is set to 0.
To get the value of <Procedure pointer>, its value must be assigned to the value of <Pointer> in the procedure with Transfer.
Note The parameters of this Procedure are optional: for example, you can specify only the name and path.
Specify (if necessary) the return value of the procedure via the RETURN keyword. The possible values are as follows:
  • 0: the file is not added to the compilation and file enumeration stops.
  • 1: the file is added to the compilation and file enumeration continues.
  • 2: the file is not added to the compilation and file enumeration continues.
Example:
PROCEDURE AddElement(Directory, Name, Change)
Trace(Directory + TAB, Name + TAB, Change + TAB)
// Burn the file and continue the enumeration
RETURN 1
// Don't burn the file and stop
// RETURN 0
// Don't burn the file and continue
// RETURN 2

Taking the listed files into account

For each listed file, you can:
  • add the file to the compilation and continue the enumeration of the files. Use the following line of code in the <Procedure name> procedure:
    RETURN 1
  • add no file to the compilation and continue the enumeration of the files. Use the following line of code in the <Procedure name> procedure:
    RETURN 2
  • add no file to the compilation and stop the enumeration of the files. Use the following line of code in the <Procedure name> procedure:
    RETURN 0
If the <Procedure name> procedure returns no value, the file is added to the compilation and the enumeration of the files continues.

Compilation

A compilation corresponds to the set of files that must be burned on a CD or DVD. This compilation will be taken into account next time BurnerSave is called.
A compilation is automatically created during the first call to BurnerAddFile or to BurnerAddDirectory. A single compilation can be created at a time.
A compilation is automatically deleted:
  • when changing the type of CD/DVD to burn (BurnerMediaType).
  • when selecting the default burner (BurnerSelect).
  • after the call to BurnerSave (only if the burn process was started, <Result> is set to True).
  • when canceling the burn process (BurnerCancel).
  • when closing the current WINDEV application or WEBDEV website.

Adding several identical files

If the same file is added several times to the compilation:
  • in the case of an audio CD/DVD: this file will be present on the CD/DVD as many times as it has been added.
  • in the case of a data CD/DVD: only the last file added (same name, same destination directory) will be present on the CD/DVD.

Required configuration

WINDEV Burning CDs is available for Windows XP and later. Burning DVDs is available for Windows Vista and for Windows XP when using the KB932716 update for Windows XP (this update must be downloaded from the Microsoft site and installed manually because it is not taken into account by the Live Update mechanism).
WEBDEV - Código Servidor The CDs and the DVDs will be burned on the Web server. To burn CDs or DVDs, the server must be running Windows XP or later. To burn CDs in Windows 2003 Server, the IMAPI burn service (named "IMAPI CD-burning COM service") must be enabled. To burn DVDs in Windows 2003 Server, you also have to install the KB932716 update.
Componente: wd300grv.dll
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local