StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_CdvdBurnerGrabber_GetAdvancedSupportedMediaFormats Function
C++
__stdcall STARBURN_IMPEX_API EXCEPTION_NUMBER StarBurn_CdvdBurnerGrabber_GetAdvancedSupportedMediaFormats(IN PVOID p__PVOID__CdvdBurnerGrabber, IN PSTARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS p__PSTARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS);
Parameters 
Description 
IN PVOID p__PVOID__CdvdBurnerGrabber 
Pointer to the CdvdBurnerGrabber object that toolkit allocated before with the call to StarBurn_CdvdBurnerGrabber_Create() or StarBurn_CdvdBurnerGrabber_CreateEx() API calls.
 
IN PSTARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS p__PSTARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS 
Pointer to pre-allocated and pre-initialized structure containing set of capabilities flags. 

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 returns CD/DVD/Blu-Ray/HD-DVD burner device object extended information. This data can be used to report the capabilities of the device to the user.

Please see the TrackAtOnceFromTree sample that will demonstrate how ISO9660 or Joliet file system image can be burn on the CD/DVD/Blu-Ray/HD-DVD media and what use can be taken from CdvdBurnerGrabber device extended information.

This example allocates CdvdBurnerGrabber object, retreives device extended information and destroys the device object after it's not needed any more. 

 

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

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

// Get CdvdBurnerGrabber device information here...

// Prepare advanced supported media formats
RtlZeroMemory(
    &l__STARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS,
    sizeof( l__STARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS )
    );

// Set structure size in UCHARs
l__STARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS.m__ULONG__SizeInUCHARs = sizeof( l__STARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS );

// Get CdvdBurnerGrabber device extended information
l__EXCEPTION_NUMBER =
StarBurn_CdvdBurnerGrabber_GetSupportedMediaFormats(
    l__PVOID__CdvdBurnerGrabber,
    &l__STARBURN_ADVANCED_SUPPORTED_MEDIA_FORMATS
    );

// Do something with CdvdBurnerGrabber device object and it's extended information here...      

// Destroy the CdvdBurnerGrabber
StarBurn_Destroy( &l__PVOID__CdvdBurnerGrabber );

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