Witam !
Mój problem polega na tym iż po zapisaniu pewnego pliku zdefiniowanego na dysku twardym, a następnie wypaleniu go na CD, nie mogę odczytać tegoż pliku w systemie XP. W Win98se nie ma żadnych problemów. Na pewno plik został prawidłowo wypalony.
Czy jest to jakieś ograniczenie dostępu do CD w XP ?
Poniżej przedstawiam kod - krótki testowy programik.
Proszę o pomoc, bo nie mam pojęcia o co chodzi.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons;
type
definicja=record
a:byte;
b:shortint;
c:boolean;
d:string[4];
e:TDateTime;
end;
TForm1 = class(TForm)
Button1: TButton;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
BitBtn1: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
plik:file of definicja;
opis:definicja;
begin
opis.a:=236;
opis.b:=123;
opis.c:=true;
opis.d:='1234';
opis.e:=now;
if savedialog1.Execute then
begin
AssignFile(plik, SaveDialog1.FileName); { File selected in dialog box }
Rewrite(plik);
Write(plik,opis); { Read the first line out of the file }
CloseFile(plik);
end;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
plik:file of definicja;
opis:definicja;
begin
if opendialog1.Execute then
begin
AssignFile(plik, OpenDialog1.FileName); { File selected in dialog box }
Reset(plik);
Read(plik,opis); { Read the first line out of the file }
CloseFile(plik);
end;
end;
end.