StarBurn SDK (Software Development Kit) |
__stdcall STARBURN_IMPEX_API EXCEPTION_NUMBER StarBurn_ISO9660JolietFileTree_BuildImage(IN PVOID p__PVOID__ISO9660JolietFileTree, OUT PCHAR p__PCHAR__ExceptionText, IN ULONG p__ULONG__ExceptionTextSizeInUCHARs, OUT PULONG p__PULONG__SystemError, IN LONG p__LONG__StartingLBA, IN LONG p__LONG__TreeLevelToProcess, IN BOOLEAN p__BOOLEAN__IsXA, IN PCHAR p__PCHAR__VolumeSetName, IN PCHAR p__PCHAR__PublisherPreparerName, IN PCHAR p__PCHAR__ApplicationName);
Parameters | Description |
IN PVOID p__PVOID__ISO9660JolietFileTree | Pointer to the ISO9660 or Joliet file tree object that toolkit allocated during call to StarBurn_ISO9660JolietFileTree_Create(). |
OUT PCHAR p__PCHAR__ExceptionText | Pointer to array of CHARs that will be used to store formatted exception description message. |
IN ULONG p__ULONG__ExceptionTextSizeInUCHARs | Size of the array of CHARs used to be formatted exception message storage. |
OUT PULONG p__PULONG__SystemError | Pointer to ULONG that will contain the system error (if some will occur). |
IN LONG p__LONG__StartingLBA | Starting LBA to build the image from (it should be the next writable address of the track on the CD/DVD/Blu-Ray/HD-DVD media, 0 for empty disc). |
IN LONG p__LONG__TreeLevelToProcess | Top tree level to process, levels that exceed this value will be ingnored and not included into the file system image. For now this parameter is ignored and whole tree will be put into the image. |
IN BOOLEAN p__BOOLEAN__IsXA | Is CDROM XA or CDROM data (do we need CDROM XA marker to be included to the the image). |
IN PCHAR p__PCHAR__VolumeSetName | Pointer to the volume set. |
IN PCHAR p__PCHAR__PublisherPreparerName | Pointer to the publisher and preparer name. |
p__PCHAR__ApplictionName | Pointer to the application name. |
Execution status. EN_SUCCESS if the operation completed successfuly. If the exception number will be EN_SYSTEM_CALL_FAILED, variable that SystemError points to will be filled with system error. If something other then EN_SUCCESS will be returned buffer that ExceptionText will point to will be filled with formatted exception message.
This function builds ISO9660 or Joliet file system image from ISO9660 or Joliet file tree (assignes all the logical block offsets and allocates and initializes all file system internal structures). Later this tree can be used to store the "virtual" ISO9660 or Joliet image to the file on the disk or to burn this ISO9660 or Joliet image directly to the CD/DVD/Blu-Ray/HD-DVD media.
Please see the BuildImage sample that will demonstrate how progress indication can be created and what parameters in general are passed into the callback function during the operations with file tree object. See ISO9660_XXX constats to verify correct string parameter lengthes.
This example allocates Joliet file tree from the directory, builds the image and destroys the file tree after it's not needed any more.
// Somewhere in the data region PVOID l__PVOID__FileTree; EXCEPTION_NUMBER l__EXCEPTION_NUMBER; ULONG l__ULONG__TreeNodes; ULONG l__ULONG__SystemError; CHAR l__CHAR__ExceptionText[ 1024 ]; // Prepare exception text buffer RtlZeroMemory( &l__CHAR__ExceptionText, sizeof( l__CHAR__ExceptionText ) ); // Try to create Joliet file tree l__EXCEPTION_NUMBER = StarBurn_ISO9660JolietFileTree_Create( &l__PVOID__FileTree, ( PCHAR )( &l__CHAR__ExceptionText ), sizeof( l__CHAR__ExceptionText ), &l__ULONG__Status, ( PCALLBACK )( StarBurn_Callback ), ( PVOID )( &l__LONG__TreeNodes ), TRUE, FALSE, FILE_TREE_JOLIET ); // Check for correct reply if ( l__EXCEPTION_NUMBER != EN_SUCCESS ) { // Handle error here... } // Try to build the image, start with LBA 0 and include up to 8 levels into the image l__EXCEPTION_NUMBER = StarBurn_ISO9660JolietFileTree_BuildImage( l__PVOID__FileTree, ( PCHAR )( &l__CHAR__ExceptionText ), sizeof( l__CHAR__ExceptionText ), &l__ULONG__SystemError, 0, 8, FALSE, "Volume", "Publisher", "Application" ); // Check for correct reply if ( l__EXCEPTION_NUMBER != EN_SUCCESS ) { // Handle error here... } // Perform actions with Joliet tree here... // Destroy the Joliet file tree StarBurn_Destroy( &l__PVOID__FileTree ); // Just check for pointer (paranoid?) if ( l__PVOID__FileTree != NULL ) { // Handle error here... }