[fpc-pascal] GetClipboardFormatName causing an Error 216
Martin Frb
lazarus at mfriebe.de
Thu Dec 31 02:03:59 CET 2020
I missed you have
FN:=StrAlloc (255);
in that case see Alexanders response.
On 31/12/2020 02:00, Martin Frb via fpc-pascal wrote:
>
> FN must point to an existing buffer (allocated mem) that receives the
> result.
>
> FN : Array [0..255]of Byte;
> GotLen := GetClipboardFormatName(Format_Id, LPTSTR(@FN[0]),250);
>
> then "move()" the received bytes into a string, make sure to use
> UniqueString() or similar
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20201231/b00ffde6/attachment.htm>
More information about the fpc-pascal
mailing list