StarBurn SDK (Software Development Kit) |
__stdcall STARBURN_IMPEX_API DISC_TYPE StarBurn_CdvdBurnerGrabber_GetInsertedDiscType(IN PVOID p__PVOID__CdvdBurnerGrabber);
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. |
Inserted disc type. This function cannot fail.
This function returns inserted to CD/DVD/Blu-Ray/HD-DVD burner device disc type. This data can be used to report it to the user and to select the stream type to record.
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 inserted disc type information.
This example allocates CdvdBurnerGrabber object, retreives inserted disc type 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; CDB_FAILURE_INFORMATION l__CDB_FAILURE_INFORMATION; DISC_TYPE l__DISC_TYPE = DISC_TYPE_UNKNOWN; // 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 inserted disc type l__DISC_TYPE = StarBurn_CdvdBurnerGrabber_GetInsertedDiscType( l__PVOID__CdvdBurnerGrabber ); // Do something with CdvdBurnerGrabber device object and it's inserted disc type here... // Destroy the CdvdBurnerGrabber StarBurn_Destroy( &l__PVOID__CdvdBurnerGrabber ); // Just check for pointer (paranoid?) if ( l__PVOID__CdvdBurnerGrabber != NULL ) { // Handle error here... }