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 ]; PVOID l__PVOID__Root; // 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, FILE_TREE_JOLIET ); // Check for correct reply if ( l__EXCEPTION_NUMBER != EN_SUCCESS ) { // Handle error here... } // Try to get root here l__PVOID__Root = StarBurn_ISO9660JolietFileTree_GetRoot( l__PVOID__FileTree ); // Check for correct reply if ( l__PVOID__Root == NULL ) { // Handle error here, keep in mind that root CAN be NULL if nothing was added to tree before... } // Try to add all from the root directory of the drive D: to already created Joliet file tree l__EXCEPTION_NUMBER = StarBurn_ISO9660JolietFileTree_AddW( l__PVOID__FileTree, ( PCHAR )( &l__CHAR__ExceptionText ), sizeof( l__CHAR__ExceptionText ), &l__ULONG__Status, L"D:\", NULL, FILE_TIME_LAST_WRITE, &l__PVOID__Root, &l__PVOID__NewNode ); // 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... }