I'm getting a failure whenever I call StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromTree() in my app. It reports:
ExceptionNumber=8;
SystemError=-858993460;
ExceptionText='CStarBurn_ScsiTransportASPI::ExecuteCDB(): Command failed'
Thanks in advance for any help you can offer!
Steve
I'll e-mail a copy of the complete log
-----------------------------------------------------------
Here's the portion of code that makes the call:
Code:
DWORD CStarBurner::BurnDisc ( BOOL bVerify )
{
EXCEPTION_NUMBER ExceptionNumber;
CHAR ExceptionText[ 1024 ];
ULONG ululSystemError;
CDB_FAILURE_INFORMATION FailureInformation;
DISC_LAYOUT DiscLayout;
CDDVDINFO DevInfo;
DWORD dwStatus = 0; // Burn Status
// Are there files to burn?
if ( ! m_pFilesToBurn )
dwStatus = (DWORD) ERROR_NOTHING_TO_WRITE;
else if ( (m_pDeviceInfo == NULL) || (m_SelectedDrive == -1) )
dwStatus = (DWORD) ERROR_DEVICE_NOT_READY;
else {
DevInfo = m_pDeviceInfo->ElementAt(m_SelectedDrive);
// Attempt to recreate the burner device, just to make sure its good
ExceptionNumber = StarBurn_CdvdBurnerGrabber_Create(
&DevInfo.pCdvdBurnerGrabber,
(PCHAR)&ExceptionText,
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation,
(PCALLBACK) (FileTreeCallback),
NULL,
DevInfo.DeviceAddress.m__UCHAR__PortID,
DevInfo.DeviceAddress.m__UCHAR__BusID,
DevInfo.DeviceAddress.m__UCHAR__TargetID,
DevInfo.DeviceAddress.m__UCHAR__LUN,
STARBURN_CACHE_SIZE_READ_ONLY);
// Check for success
if (ExceptionNumber != EN_SUCCESS)
{
dwStatus = (DWORD) ERROR_DEVICE_NOT_READY;
CString strMsg;
strMsg.Format(
_T("DeviceInfoThread: StarBurn_CdvdBurnerGrabber_Create() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent(dwStatus, EVENTLOG_ERROR_TYPE, strMsg);
}
else {
// Test the device's readiness before continuing
ExceptionNumber = StarBurn_CdvdBurnerGrabber_TestUnitReady(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation);
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
dwStatus = ERROR_BURN_FAILED;
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_TestUnitReady() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (dwStatus, EVENTLOG_ERROR_TYPE, strMsg);
}
else {
ExceptionNumber = StarBurn_CdvdBurnerGrabber_SetBUP(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation,
TRUE);
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
dwStatus = ERROR_BURN_FAILED;
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_SetBUP() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (dwStatus, EVENTLOG_ERROR_TYPE, strMsg);
}
}
}
}
// Verify we haven't gone too deep in our tree structure
LONG level = StarBurn_ISO9660JolietFileTree_GetLevel (m_pFilesToBurn);
if (level > ISO9660_TREE_LEVEL) {
dwStatus = ERROR_BURN_FAILED;
LogEvent(dwStatus, EVENTLOG_ERROR_TYPE, "CStarBurner::BurnDisc(): Warning: Tree level exceeds allowed 8, image may be unusable!!!" );
}
else if ( ! dwStatus ) {
// Create an ISO Track to measure
ExceptionNumber = StarBurn_ISO9660JolietFileTree_BuildImage(
m_pFilesToBurn,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
DevInfo.NextWritableAddress,
level,
TRUE,
"CCSW_Files",
"CCSW",
"ProductXYZ");
// Check for success
if (ExceptionNumber != EN_SUCCESS)
{
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_ISO9660JolietFileTree_BuildImage() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (0, EVENTLOG_ERROR_TYPE, strMsg);
}
else {
// Format disc layout
RtlZeroMemory(&DiscLayout, sizeof(DiscLayout));
DiscLayout.m__LONG__NumberOfEntries = 1;
DiscLayout.m__DISC_LAYOUT_ENTRY[ 0 ].m__PVOID__Tree = m_pFilesToBurn;
// Burn the disc
ExceptionNumber = StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromTree(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation,
m_pFilesToBurn,
FALSE,
FALSE,
FALSE,
1,
5);
// Check for success
if (ExceptionNumber != EN_SUCCESS)
{
dwStatus = ERROR_BURN_FAILED;
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromTree() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (dwStatus, EVENTLOG_ERROR_TYPE, strMsg);
}
// Verify files on Disc
else if ( bVerify ) {
// Try to eject the disc as only TAO can verify data w/o media eject, both DAO and SAO need disc to be ejected
ExceptionNumber = StarBurn_CdvdBurnerGrabber_Eject(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation);
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_Eject() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (0, EVENTLOG_ERROR_TYPE, strMsg);
}
else
{
// Try to load the disc as we cannot verify data w/o disc in drive
ExceptionNumber = StarBurn_CdvdBurnerGrabber_Load(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation);
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_Load() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (0, EVENTLOG_ERROR_TYPE, strMsg);
}
else
{
PLONG pFailedLBA = NULL;
// Try to verify recorded data
ExceptionNumber = StarBurn_CdvdBurnerGrabber_VerifyTree(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation,
m_pFilesToBurn,
DevInfo.NextWritableAddress,
(PLONG) (&pFailedLBA),
1000); // 1000 logical blocks between progress callback
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
dwStatus = ERROR_VERIFY_FAILED;
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_VerifyTree() failed at LBA %d, exception %ld, status %ld, text '%s'"),
pFailedLBA,
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (dwStatus, EVENTLOG_ERROR_TYPE, strMsg);
}
}
}
}
// Free the track memory
Reset();
}
// Try to eject the disc now that we're done
ExceptionNumber = StarBurn_CdvdBurnerGrabber_Eject(
DevInfo.pCdvdBurnerGrabber,
(PCHAR) (&ExceptionText),
sizeof(ExceptionText),
&ululSystemError,
&FailureInformation);
// Check for success
if ( ExceptionNumber != EN_SUCCESS )
{
CString strMsg;
strMsg.Format(
_T("CStarBurner::BurnDisc(): StarBurn_CdvdBurnerGrabber_Eject() failed, exception %ld, status %ld, text '%s'"),
ExceptionNumber,
ululSystemError,
ExceptionText);
LogEvent (0, EVENTLOG_ERROR_TYPE, strMsg);
}
}
return dwStatus;
}