#1 Burning Software

It is currently Wed Dec 18, 2024 7:49 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Why?
PostPosted: Fri Jun 24, 2011 5:32 am 
Offline

Joined: Fri Jun 24, 2011 5:24 am
Posts: 4
Try to erase cd if it's not blank before burning.
If I call _IsValidDevice; once, I can't burn CD, because it returns false. So I have to call it twice, and everything works. Why?

Code:
procedure TfmMainForm.OnBurn(Sender: TObject);
var
  p_device: ^TDeviceStruct;
begin
  p_device := m_working_thread.GetDevices[m_cbDrives.ItemIndex];
  if not p_device.isBlank then
    if MessageDlg('Disc is not blank. You cannot use it.' + #10#13 +
      'Do you want to erase it?', mtWarning, [mbYes, mbNo], 0, mbYes) = mrYes then
    begin
      with TfmDiskEraser.Create(Application) do ShowModal;
      _IsValidDevice;
    end;

  if _IsValidDevice <> True then
  begin
    ShowMessage('_IsValidDevice<>True');
  end
  else
    if _IsValidFiles <> True then
    begin
      ShowMessage('_IsValidFiles<>True');
    end
    else
      _Burn();
end;


Code:
function TfmMainForm._IsValidDevice(): Boolean;
var
  p_device: ^TDeviceStruct;
begin
  p_device := m_working_thread.GetDevices[m_cbDrives.ItemIndex];

  if (p_device.disctype <> DISC_TYPE_CDR) and
    (p_device.disctype <> DISC_TYPE_CDRW) then
  begin
    Result := False;
    Application.MessageBox('You must use CDR or CDRW discs only', 'Warning', MB_OK);
    Exit;
  end;

  if not p_device.isBlank then
  begin
    Result := False;
    Application.MessageBox('Disc is not blank. You cannot use it', 'Warning', MB_OK);
    Exit;
  end;

  if not p_device.isWritable then
  begin
    Result := False;
    Application.MessageBox('Disc is not writable. You cannot use it', 'Warning', MB_OK);
    Exit;
  end;

  Result := True;
end;


The first time I get message 'Disc is not blank. You cannot use it', and int second time OK, and I can burn it. If I comment string
Code:
Application.MessageBox('Disc is not blank. You cannot use it', 'Warning', MB_OK);
I get message 'Disc is not writable. You cannot use it'... What happens? Why message
Code:
Application.MessageBox('Disc is not blank. You cannot use it', 'Warning', MB_OK);
makes disk "blank"? :roll: Два дня потратил уже :(


Top
 Profile  
 
 Post subject: Re: Why?
PostPosted: Tue Jun 28, 2011 4:49 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Unfortunately I cannot get from your source code what you do wrong. Could you please ship StarBurn log and some comments at the places you get response you think is not valid. Thanks!


Top
 Profile  
 
 Post subject: Re: Why?
PostPosted: Thu Aug 11, 2011 6:09 pm 
Offline

Joined: Fri Jun 24, 2011 5:24 am
Posts: 4
How can I get this log?


Top
 Profile  
 
 Post subject: Re: Why?
PostPosted: Fri Aug 12, 2011 11:51 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello Ruslan,

What do you use - StarBurnX or native StarBurn SDK?

Note: you may e-mail me directly: dmitry.bortsov@rocketdivision.com

Dima

Regards,


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

All times are UTC


Who is online

Users browsing this forum: No registered users 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