StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_ISO9660JolietFileTree_ImportTrack Function
C++
__stdcall STARBURN_IMPEX_API EXCEPTION_NUMBER StarBurn_ISO9660JolietFileTree_ImportTrack(IN PVOID p__PVOID__CdvdBurnerGrabber, IN PVOID p__PVOID__ISO9660JolietFileTree, IN UCHAR p__UCHAR__TrackNumber, IN BOOLEAN p__BOOLEAN__ImportJolietStructures, OUT PCHAR p__PCHAR__ExceptionText, IN ULONG p__ULONG__ExceptionTextSizeInUCHARs, OUT PULONG p__PULONG__SystemError);
Parameters 
Description 
IN PVOID p__PVOID__CdvdBurnerGrabber 
Pointer to the CdvdBurnerGrabber object that toolkit allocated before with the call to StarBurn_CdvdBurnerGrabber_Create().
 
IN PVOID p__PVOID__ISO9660JolietFileTree 
Pointer to ISO9660 or Joliet file tree to import track to.
 
IN UCHAR p__UCHAR__TrackNumber 
Track number to import.
 
IN BOOLEAN p__BOOLEAN__ImportJolietStructures 
Should we try to import Joliet structures (TRUE) or proceed with ISO9660 only (FALSE).
 
OUT PCHAR p__PCHAR__ExceptionText 
Pointer to exception text buffer.
 
IN ULONG p__ULONG__ExceptionTextSizeInUCHARs 
Exception text size in UCHARs.
 
OUT PULONG p__PULONG__SystemError 
Pointer to system error. 

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. If the exception number will be EN_SCSI_CDB_FAILED, CDB_FAILURE_INFORMATION will be filled with apropriate values (CDB that faled, CDB size, SCSI sense data, SCSI sense data size, SCSI transport, device and host adapter status codes).

This function imports track for created ISO9660 or Joliet file tree.

Please see the TrackAtOnceFromTreeWithImport sample that will demonstrate how ISO9660 or Joliet file system image can be created, existing track imported and whole result burn to the CD/DVD/Blu-Ray/HD-DVD media. 

[ WARNING! It's required to create empty file tree, import existing disc content into it and only after this add new or delete existing file tree nodes. Reversed direction should not be tried! ]

// Somewhere in the data region
PVOID l__PVOID__CdvdBurnerGrabber;
EXCEPTION_NUMBER l__EXCEPTION_NUMBER;
ULONG l__ULONG__SystemError;
CHAR l__CHAR__ExceptionText[ 1024 ];
CDB_FAILURE_INFORMATION l__CDB_FAILURE_INFORMATION;
PVOID l__PVOID__ISO9660JolietFileTree;

// Prepare exception text buffer
RtlZeroMemory(
    &l__CHAR__ExceptionText,
    sizeof( l__CHAR__ExceptionText )
    );

// Prepare CDB failure information
RtlZeroMemory(
    &l__CDB_FAILURE_INFORMATION,
    sizeof( l__CDB_FAILURE_INFORMATION )
    );

// Try to create CdvdBurnerGrabber on 0:0:4:0 with 32MB of cache
l__EXCEPTION_NUMBER =
StarBurn_CdvdBurnerGrabber_Create(
    &l__PVOID__CdvdBurnerGrabber,
    ( PCHAR )( &l__CHAR__ExceptionText ),
    sizeof( l__CHAR__ExceptionText ),
    &l__ULONG__SystemError,
    &l__CDB_FAILURE_INFORMATION,
    ( PCALLBACK )( StarBurn_Callback ),
    0,
    0,
    4,
    0,
    32
    );

// Check for correct reply
if (  l__EXCEPTION_NUMBER != EN_SUCCESS )
{
// Handle error here...
}

// Create and add something to ISO9660 file tree here

// Try to import file system structures from the track
l__EXCEPTION_NUMBER =
StarBurn_ISO9660JolietFileTree_ImportTrack(
    l__PVOID__CdvdBurnerGrabber,
    l__PVOID__ISO9660JolietFileTree,
    0x01, // First track,
    TRUE, // Try to proceed as Joliet
    ( PCHAR )( &l__CHAR__ExceptionText ),
    sizeof( l__CHAR__ExceptionText ),
    &l__ULONG__SystemError
    );

// Check for correct reply
if ( l__EXCEPTION_NUMBER != EN_SUCCESS )
{
// Handle error here...
}

// Destroy the CdvdBurnerGrabber
StarBurn_Destroy( &l__PVOID__CdvdBurnerGrabber );

// Just check for pointer (paranoid?)
if ( l__PVOID__CdvdBurnerGrabber != NULL )
{
// Handle error here...
}