The memory for FN is allocated at the top with StrAlloc()
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Martin
Frb via fpc-pascal
Sent: Wednesday, December 30, 2020 8:00 PM
To: fpc-pascal@lists.freepascal.org
Cc: Martin Frb
Subject:
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[
On 31/12/2020 01:09, James Richters via fpc-pascal wrote:
Var
FN : LPTSTR;
Begin
FN:='';
Writeln(Format_ID);
GetClipboardFormatName(Format_Id,FN,250);
Check the msdn help.
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuse
On 31/12/2020 01:09, James Richters via fpc-pascal wrote:
I'm trying to write a programs to get data from the windows clipboard that
was put into it with Notepad++ using vertical editing.
Just for Info, SynEdit (trunk) can handle notepad++ column selection
See the code at.
There are 2 common f
Your
FN:='';
is clobbering the pointer 'FN' with nonsense.
Just leave that line out, it isn't necessary. Or do like FN^:=#0; if you want
C-string like functions to report zero length..
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of J
I'm trying to write a programs to get data from the windows clipboard that
was put into it with Notepad++ using vertical editing.
It uses a non-standard format and I'm trying to figure it out.
GetClipboardFormatName is supposed to get me the name of non-standard
formats,
but whenever I try to run i
The TP7 manual suggests it was possible to partially free the memory. If you
had a pointer to the un-freed chunk, I wonder if that could also have been
freed, or if was left in limbo.
As the manual suggests, I bet everyone just used SizeOf() as the parameter, and
I'm not so sure how useful usin
Op 2020-12-30 om 23:54 schreef Graeme Geldenhuys via fpc-pascal:
Do both these method yield the same result, or is one better (performance,
safer?) that the other?
procedure FreeMem(p:pointer;Size:ptruint);
procedure FreeMem(p:pointer);
They are the same. TP required size for deallocation, D
Hi,
Do both these method yield the same result, or is one better (performance,
safer?) that the other?
procedure FreeMem(p:pointer;Size:ptruint);
procedure FreeMem(p:pointer);
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
M