StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_ISO9660JolietFileTree_SetBootImage Function
C++
__stdcall STARBURN_IMPEX_API EXCEPTION_NUMBER StarBurn_ISO9660JolietFileTree_SetBootImage(IN PVOID p__PVOID__ISO9660JolietFileTree, IN PCHAR p__PCHAR__AbsoluteFileName, IN UCHAR p__UCHAR__SystemType, IN UCHAR p__UCHAR__MediaType, IN UCHAR p__UCHAR__SectorsToLoad, IN BOOLEAN p__BOOLEAN__HideNode, OUT PCHAR p__PCHAR__ExceptionText, IN ULONG p__ULONG__ExceptionTextSizeInUCHARs, OUT PULONG p__PULONG__SystemError);
Parameters 
Description 
IN PVOID p__PVOID__ISO9660JolietFileTree 
Pointer to ISO9660 or Joliet file tree to add boot image to.
 
IN PCHAR p__PCHAR__AbsoluteFileName 
Pointer to absolute file name of the boot image.
 
IN UCHAR p__UCHAR__SystemType 
System type value.
 
IN UCHAR p__UCHAR__MediaType 
Media type value.
 
IN UCHAR p__UCHAR__SectorsToLoad 
Number of sectors to load
 
IN BOOLEAN p__BOOLEAN__HideNode 
Indicates will the node be present in the root folder or not
 
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.

This function sets boot image for created ISO9660 or Joliet file tree.

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

// 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 set boot image
l__EXCEPTION_NUMBER =
StarBurn_ISO9660JolietFileTree_SetBootImage(
    l__PVOID__ISO9660JolietFileTree,
    "C:\bootimage.bin", // Here is our bootimage we gonna use
    6, // Just stick with 6 here...
    ELTORITO_MEDIA_FLOPPY144,
    1,// set only one sector to load
    FALSE, // don't hide the file
    ( 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...
}