StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_ISO9660JolietFileTree_Create Function
C++
__stdcall STARBURN_IMPEX_API EXCEPTION_NUMBER StarBurn_ISO9660JolietFileTree_Create(OUT PVOID * p__PPVOID__ISO9660JolietFileTree, OUT PCHAR p__PCHAR__ExceptionText, IN ULONG p__ULONG__ExceptionTextSizeInUCHARs, OUT PULONG p__PULONG__SystemError, IN PCALLBACK p__PCALLBACK, IN PVOID p__PVOID__CallbackContext, IN BOOLEAN p__BOOLEAN__IsInvalidKidIgnore, IN BOOLEAN p__BOOLEAN__IsLocked, IN BOOLEAN p__BOOLEAN__IsLevel2, IN FILE_TREE p__FILE_TREE);
Parameters 
Description 
OUT PVOID * p__PPVOID__ISO9660JolietFileTree 
Pointer to pointer to the object that toolkit will set to the ISO9660 or Joliet file tree object it will allocate.
 
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 PCALLBACK p__PCALLBACK 
Pointer to callback function that will be called from inside the toolkit to inform the user about the progress of this operaion (See samples how to use this callback for progress indication and other useful things).
 
IN PVOID p__PVOID__CallbackContext 
Pointer to arbitrary context value that will be passed as first PVOID parameter to the called callback function.
 
IN BOOLEAN p__BOOLEAN__IsInvalidKidIgnore 
TRUE to ignore bad kids (files or directories that cannot be accessed), FALSE to abort on every unsuccessful attempt to access such a files or directories.
 
IN BOOLEAN p__BOOLEAN__IsLocked 
TRUE of all files of the file tree will be locked, FALSE if they will not be locked (their file handles will not be opened all the times - FALSE must be specified if running under Win9x OSes that have opened files limitation).
 
IN BOOLEAN p__BOOLEAN__IsLevel2 
TRUE if Level2 ISO9660 names generation is used, FALSE if DOS 8.3 format for names generation is used.
 
IN FILE_TREE p__FILE_TREE 
Type of file tree to build, ISO9660 or Joliet (See FILE_TREE for details). 

Execution status. EN_SUCCESS if the tree was allocated successfuly, E_MEMORY_ALLOCATION_FAILED if there is not enough memory to allocate the tree. 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 allocates in the memory and initializes ISO9660 or Joliet file tree. Later this file tree can be used to build "virtual" ISO96600 or Joliet file system image. Resulting "virtual" image can be either stored in the file on the disk or be recorder directly to the CD/DVD/Blu-Ray/HD-DVD media w/o any other intermediate buffering operations on the hard disk.

Please see the BuildImage sample that will demonstrate how progress indication can be build and what parameters in general are passed into the callback function during the operations with file tree object.

This example allocates Joliet file tree and destroys it 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 )( Callback ),
    ( PVOID )( &l__LONG__TreeNodes ),
    TRUE,
    FALSE,
    TRUE,
    FILE_TREE_JOLIET
    );

// 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...
}