StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_CdvdBurnerGrabber_GetNumberOfSystemDescriptors Function
C++
__stdcall STARBURN_IMPEX_API LONG StarBurn_CdvdBurnerGrabber_GetNumberOfSystemDescriptors(IN PVOID p__PVOID__CdvdBurnerGrabber, IN PUCHAR p__PUCHAR__SystemStructures, IN LONG p__LONG__SystemStructuresSizeInLBs);
Parameters 
Description 
IN PVOID p__PVOID__CdvdBurnerGrabber 
Pointer to the CdvdBurnerGrabber object that toolkit allocated before.
 
IN PUCHAR p__PUCHAR__SystemStructures 
Pointer to system structures pre-read into memory buffer.
 
IN LONG p__LONG__SystemStructuresSizeInLBs 
System structures size in logical blocks. 

Number of system descriptors. This code cannot fail.

This function gets number of system descriptors in system structures stream. This value is used for updating head of the image when creating signle track session import code.

Please see BuildImageWithImportFromFile sample that will demonstrate how ISO9660 or Joliet file system image can be imported from hard disk ISO disk image and how StarBurn_CdvdBurnerGrabber_GetNumberOfSystemDescriptors(...) can be used to get number of system descriptors when updating system image head.

This example allocates CdvdBurnerGrabber object, gets number of system descriptors and destroys the device object after it's not needed any more. 

 

// Somewhere in the data region
PVOID l__PVOID__CdvdBurnerGrabber = NULL;
LONG l__LONG__NumberOfSystemDescriptors = 0;
PUCHAR l__PUCHAR__SystemStructures = 0;

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

// Allocate enough memory for system structures in l__PUCHAR__SystemStructures here...

// Read system structures from the optical disc to l__PUCHAR__SystemStructures buffer here...

// Try to get number of system descriptors
l__LONG__NumberOfSystemDescriptors =
StarBurn_CdvdBurnerGrabber_GetNumberOfSystemDescriptors(
    l__PVOID__CdvdBurnerGrabber,
    l__PUCHAR__SystemStructures,
    SYSTEM_STRUCTURES_SIZE_IN_LOGICAL_BLOCKS
    );

// Do something with l__LONG__NumberOfSystemDescriptors here...
    
// Do something with CdvdBurnerGrabber device object here...        

// Destroy the CdvdBurnerGrabber
StarBurn_Destroy( &l__PVOID__CdvdBurnerGrabber );

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