[fpc-pascal] GetClipboardFormatName causing an Error 216

Alexander Grotewohl alex at dcclost.com
Fri Jan 1 08:50:27 CET 2021


yes, this type of thing is why we use Pascal. pchar is your little bucket of ram that FPC in a sense knows nothing about. set it to #0 and pray for the best, cause that's what you do..

--
Alexander Grotewohl
https://dcclost.com
________________________________
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> on behalf of Jean SUZINEAU via fpc-pascal <fpc-pascal at lists.freepascal.org>
Sent: Friday, January 1, 2021 2:41:18 AM
To: fpc-pascal at lists.freepascal.org <fpc-pascal at lists.freepascal.org>
Cc: Jean SUZINEAU <jean.suzineau at wanadoo.fr>
Subject: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

Le 01/01/2021 à 00:48, James Richters via fpc-pascal a écrit :

I’m not too familiar with PChars, but is there a way to set it to zero length?

I set it to #0 and it works ok with the #0 in there with Notepadd++ but I think it’s technically not correct.

For me, it's correct. C strings are just terminated with a null character, no notion of length, the length is not recorded in the string as in Pascal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210101/ab520ae5/attachment.htm>


More information about the fpc-pascal mailing list