Good morning Mike,
I'm having doubts about his example vcl demo (IrDAOPPClientDemo.dpr). I managed to run your demo without any problems, but did not want to open a OpenDialog to fetch the file that I send to the destination device. I want to send directly, since I have my file in the c: \ file.txt.
His example is
TfmMain.btPutClick procedure (Sender: TObject);
var
Stream: TFileStream;
begin
then begin if OpenDialog.Execute
Stream: = TFileStream.Create (OpenDialog.FileName, or fmOpenRead fmShareDenyWrite);
wclShowError (wclOPPClient.Put (ExtractFileName (OpenDialog.FileName), Stream));
Stream.Free;
end;
end;
I wanted something so bad, but it's error OpenDialog obex but is operating normally:
if FileExists ('c:\file.txt') then begin
Stream: TFileStream.Create = ('c:\file.txt' or fmOpenRead fmShareDenyWrite);
wclShowError (wclOPPClient.Put (ExtractFileName ('c:\file.txt'), Stream));
Stream.Free;
end;
It's this error, if I put OpenDialog works, what am I doing wrong?
---------------------------
Error
---------------------------
OBEX session is not active.
---------------------------
OK
---------------------------