<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
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..</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
--<br>
Alexander Grotewohl<br>
<a href="https://dcclost.com" target="_blank">https://dcclost.com</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fpc-pascal <fpc-pascal-bounces@lists.freepascal.org> on behalf of Jean SUZINEAU via fpc-pascal <fpc-pascal@lists.freepascal.org><br>
<b>Sent:</b> Friday, January 1, 2021 2:41:18 AM<br>
<b>To:</b> fpc-pascal@lists.freepascal.org <fpc-pascal@lists.freepascal.org><br>
<b>Cc:</b> Jean SUZINEAU <jean.suzineau@wanadoo.fr><br>
<b>Subject:</b> Re: [fpc-pascal] GetClipboardFormatName causing an Error 216</font>
<div> </div>
</div>
<div>
<div class="x_moz-cite-prefix">Le 01/01/2021 à 00:48, James Richters via fpc-pascal a écrit :<br>
</div>
<blockquote type="cite">
<p class="x_MsoNormal"><span style="">I’m not too familiar with PChars, but is there a way to set it to zero length?</span></p>
<p class="x_MsoNormal"><span style="">I set it to #0 and it works ok with the #0 in there with Notepadd++ but I think it’s technically not correct.</span></p>
</blockquote>
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.<br>
</div>
</body>
</html>