Rocket Division Software http://www.starburnsoftware.com/forum/ |
|
Why? http://www.starburnsoftware.com/forum/starburn-sdk-f3/why-t2182.html |
Page 1 of 1 |
Author: | Ruslan [ Fri Jun 24, 2011 5:32 am ] |
Post subject: | Why? |
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"? Два дня потратил уже
|
Author: | anton (staff) [ Tue Jun 28, 2011 4:49 pm ] |
Post subject: | Re: Why? |
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! |
Author: | Ruslan [ Thu Aug 11, 2011 6:09 pm ] |
Post subject: | Re: Why? |
How can I get this log? |
Author: | dima (staff) [ Fri Aug 12, 2011 11:51 am ] |
Post subject: | Re: Why? |
Hello Ruslan, What do you use - StarBurnX or native StarBurn SDK? Note: you may e-mail me directly: dmitry.bortsov@rocketdivision.com Dima Regards, |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |