#1 Burning Software

It is currently Thu Mar 28, 2024 11:45 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: If Disc in device & BuildImage
PostPosted: Sun Sep 12, 2004 12:58 pm 
Offline

Joined: Thu Aug 26, 2004 12:58 am
Posts: 45
Hi :
I have some new questions:
1. How do detect if there is a disc in device?
2.I am trying to build a image file ,I open it with UltralSO and I found a additionally file named 'sing.bin' , What is it used for doing?
3.After i burned file from 'c:\back' with SessionAtOnceFromTree.exe and TrackAtOnceFromTree.exe ,I noticed
that folders and files are localed in folder '2004_9_11_14 _04_12', but i don't want my files in any other folder.
4.Can i append files on disc with SessionAtOnce mode?

Thank you every much.


Top
 Profile  
 
 Post subject: Re: If Disc in device & BuildImage
PostPosted: Sun Sep 12, 2004 5:28 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
1. You need to execute StarBurn_CdvdBurnerGrabber_TestUnitReady() code. On successful completion you have disc inserted.

2. It just a sample code to show how to insert virtual file to created file system. See call to StarBurn_ISO9660JolietFileTree_AddMemory(). You just skip calling it and you'll not have this file present :-)

3. Again. This is just a sample code renaming virtual root to whatever you want. See the lines below the comment "Generate today date and time as now root directory name".

4. No. Only TAO (Track-At-Once) should be used for multisession discs. Both Session-At-Once and Disc-At-Once leave disc closed for future writes.

P.S. It seems it was you who wanted OGG Vorbis support. Good news for you -- we're done with OGG implementation and version should be built not later then this week.

Thank you!

abs wrote:
Hi :
I have some new questions:
1. How do detect if there is a disc in device?
2.I am trying to build a image file ,I open it with UltralSO and I found a additionally file named 'sing.bin' , What is it used for doing?
3.After i burned file from 'c:\back' with SessionAtOnceFromTree.exe and TrackAtOnceFromTree.exe ,I noticed
that folders and files are localed in folder '2004_9_11_14 _04_12', but i don't want my files in any other folder.
4.Can i append files on disc with SessionAtOnce mode?

Thank you every much.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 4:46 am 
Offline

Joined: Thu Aug 26, 2004 12:58 am
Posts: 45
About quistion 1.
I see if there is no disc in device the StarBurn_CdvdBurnerGrabber_TestUnitReady function
will takes more than 20 seconds ,do you have method let it soon a bit ?

Thanks for your support.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 5:11 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
No. Would you like to us to add _TestUnitReadyEx(...) variant with passed maximum time to wait in seconds? (This functionality is not exported but it's already present, so it's just a couple of minutes to add this code).

Thank you!

abs wrote:
About quistion 1.
I see if there is no disc in device the StarBurn_CdvdBurnerGrabber_TestUnitReady function
will takes more than 20 seconds ,do you have method let it soon a bit ?

Thanks for your support.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 6:07 am 
Offline

Joined: Thu Jul 08, 2004 8:25 am
Posts: 51
Location: Germany
hey ads.

In my code I had the same behavior (but only when using the debug-version of StarBurn-DLL)...I found out, that StarBurn_CdvdBurnerGrabber_TestUnitReady takes a very long time if there is NO media in, so I simply call Win-SDK GetDiskFreeSpace( szDeviceName, NULL, NULL, NULL, NULL ); wich returns FALSE if there is no disc, and if so, I do not call StarBurn_CdvdBurnerGrabber_TestUnitReady...

Spin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 2:40 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!

SpinDoctor wrote:
hey ads.

In my code I had the same behavior (but only when using the debug-version of StarBurn-DLL)...I found out, that StarBurn_CdvdBurnerGrabber_TestUnitReady takes a very long time if there is NO media in, so I simply call Win-SDK GetDiskFreeSpace( szDeviceName, NULL, NULL, NULL, NULL ); wich returns FALSE if there is no disc, and if so, I do not call StarBurn_CdvdBurnerGrabber_TestUnitReady...

Spin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 13, 2004 4:44 pm 
Offline

Joined: Thu Jul 08, 2004 8:25 am
Posts: 51
Location: Germany
anton (staff) wrote:
This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!


hmmmmm....
think twice...imagine, TestUnitReadyEx is called with a timeout, say 3 seconds, and it returns with, probably, RET_TIMEOUT or something...what is the state then? Disc not ready? No disc in drive?

just askin' :D

Spin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 12:23 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
You can always analyze SCSI sense data coming from TestUnitReady(Ex). ASC/ASCQ or 0x3A/xx means "no disc in drive" or "tray opened" and other codes can be interpreted as "unit is in process of becoming ready".

SpinDoctor wrote:
anton (staff) wrote:
This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!


hmmmmm....
think twice...imagine, TestUnitReadyEx is called with a timeout, say 3 seconds, and it returns with, probably, RET_TIMEOUT or something...what is the state then? Disc not ready? No disc in drive?

just askin' :D

Spin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 1:18 pm 
Offline

Joined: Wed Jul 21, 2004 7:03 am
Posts: 19
Location: Poland
Something like that :-):

Code:
struct ErrorReport
{
   CHAR   chText[1024];
   ULONG   ulStatus;
   CDB_FAILURE_INFORMATION   cdbFailInfo;
   EXCEPTION_NUMBER   iNr;
   ErrorReport();
   void Clear();
   bool Success();
   std::string SenseString();
   std::string ErrorAsString();
};

std::string ErrorReport::SenseString()
{
   std::string S;
   for (int i = 0; i < (int)cdbFailInfo.m__UCHAR__SenseSizeInUCHARs; i++)
   {
      CString N;
      N.Format("%0.2X", cdbFailInfo.m__UCHAR__Sense[i]);
      S += N;
   }
   return S;
}

bool IsDiscInserted(PVOID pCdvdBurnerGrabber)
{
   bool bResult = false;
   DISC_INFORMATION DI;
   ErrorReport ERR;
   ERR.iNr = StarBurn_CdvdBurnerGrabber_GetDiscInformation(pCdvdBurnerGrabber,
      (PCHAR)(&ERR.chText), sizeof(ERR.chText), &ERR.ulStatus, &ERR.cdbFailInfo, &DI);
   bResult = (ERR.SenseString().find("3A00") == std::string::npos);
   return bResult;
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 3:24 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Very close :-) Actually we'll add some kind of macro taking CDB failure information as pointer and returning different SCSI sense meanings (decoding 17 bytes or processed SCSI sense to the form readable my most of the humans) :-) For now we're gathering the opinions -- how this code should look like. Your vote is accepted :-)

Vetch wrote:
Something like that :-):

Code:
struct ErrorReport
{
   CHAR   chText[1024];
   ULONG   ulStatus;
   CDB_FAILURE_INFORMATION   cdbFailInfo;
   EXCEPTION_NUMBER   iNr;
   ErrorReport();
   void Clear();
   bool Success();
   std::string SenseString();
   std::string ErrorAsString();
};

std::string ErrorReport::SenseString()
{
   std::string S;
   for (int i = 0; i < (int)cdbFailInfo.m__UCHAR__SenseSizeInUCHARs; i++)
   {
      CString N;
      N.Format("%0.2X", cdbFailInfo.m__UCHAR__Sense[i]);
      S += N;
   }
   return S;
}

bool IsDiscInserted(PVOID pCdvdBurnerGrabber)
{
   bool bResult = false;
   DISC_INFORMATION DI;
   ErrorReport ERR;
   ERR.iNr = StarBurn_CdvdBurnerGrabber_GetDiscInformation(pCdvdBurnerGrabber,
      (PCHAR)(&ERR.chText), sizeof(ERR.chText), &ERR.ulStatus, &ERR.cdbFailInfo, &DI);
   bResult = (ERR.SenseString().find("3A00") == std::string::npos);
   return bResult;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group