Hi
I have this code which copies stream data to and from clipboard.
It works fine on Windows, but not under MacOS.
procedure CopyStreamToClipboard(fmt: Cardinal; S: TStream);
begin
Clipboard.Open;
try
Clipboard.AddFormat(fmt, S); // Директно използване на fmt за Windows
finally
Clipboard.Close;
end;
end;
function copyClipboardToStream(aFormat: Cardinal; aStream: TStream): Boolean;
begin
Result := false;
if not Assigned(aStream) then
exit;
Clipboard.Open();
try
if not Clipboard.HasFormat(aFormat) then
exit;
Result := Clipboard.GetFormat(aFormat, aStream);
finally
Clipboard.Close();
end;
end;
Can you, advice, what will be the appropriate approach to handle the stream read write to clipboard on MacOS
Thanks
Lazarus 4.0RC1 (rev t-fixes-4-58-g43d904ed50) FPC 3.2.2 x86_64-win64-win32/win64
Lazarus 4.99 (rev main_4_99-590-g9b726c777f) FPC 3.2.2 aarch64-darwin-coca