StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_CdvdBurnerGrabber_GetDeviceInformation Function
C++
__stdcall STARBURN_IMPEX_API VOID StarBurn_CdvdBurnerGrabber_GetDeviceInformation(IN PVOID p__PVOID__CdvdBurnerGrabber, OUT PCHAR p__PCHAR__VendorID, OUT PCHAR p__PCHAR__ProductID, OUT PCHAR p__PCHAR__ProductRevisionLevel, OUT PULONG p__PULONG__BufferSizeInUCHARs);
Parameters 
Description 
IN PVOID p__PVOID__CdvdBurnerGrabber 
Pointer to the CdvdBurnerGrabber object that toolkit allocated before with the call to StarBurn_CdvdBurnerGrabber_Create().
 
OUT PCHAR p__PCHAR__VendorID 
Pointer to array of CHARs that will be used to store vendor ID string.
 
OUT PCHAR p__PCHAR__ProductID 
Pointer to array of CHARs that will be used to store product ID string.
 
OUT PCHAR p__PCHAR__ProductRevisionLevel 
Pointer to array of CHARs that will be used to store product revision level string.
 
OUT PULONG p__PULONG__BufferSizeInUCHARs 
Pointer to ULONG that will contain the device internal cache buffer size in UCHARs. 

None. This function cannot fail.

This function returns CD/DVD/Blu-Ray/HD-DVD burner device object information. This data can be used to report the capabilities of the device to the user.

Please see the TrackAtOnceFromTree and TrackAtOnceFromFile samples 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 information.

This example allocates CdvdBurnerGrabber object, retreives device 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 ];
CHAR l__CHAR__VendorID[ 1024 ];
CHAR l__CHAR__ProductID[ 1024 ];
CHAR l__CHAR__ProductRevisionLevel[ 1024 ];
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...
}

// Prepare vendor ID and product ID and product revision level buffers

RtlZeroMemory(
    &l__CHAR__VendorID,
    sizeof( l__CHAR__VendorID )
    );

RtlZeroMemory(
    &l__CHAR__ProductID,
    sizeof( l__CHAR__ProductID )
    );

RtlZeroMemory(
    &l__CHAR__ProductRevisionLevel,
    sizeof( l__CHAR__ProductRevisionLevel )
    );

// Get CdvdBurnerGrabber device information
StarBurn_CdvdBurnerGrabber_GetDeviceInformation(
    l__PVOID__CdvdBurnerGrabber,
    ( PCHAR )( &l__CHAR__VendorID ),
    ( PCHAR )( &l__CHAR__ProductID ),
    ( PCHAR )( &l__CHAR__ProductRevisionLevel ),
    &l__ULONG__CacheBufferSizeInUCHARs
    );

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

// Destroy the CdvdBurnerGrabber
StarBurn_Destroy( &l__PVOID__CdvdBurnerGrabber );

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