Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2021-01-02 Thread James Richters via fpc-pascal
>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.. I'll just leave it with the #0, it doesn't seem to be hurting anything. Thanks to everyone for the help

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2021-01-01 Thread James Richters via fpc-pascal
I have my project working the way I want it to, but I have one little quirk I am hoping to fix. When I look at the clipboard, the entry for MSDEVColumnSelect has zero length. 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

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread Alexander Grotewohl via fpc-pascal
of Jean SUZINEAU via fpc-pascal Sent: Friday, January 1, 2021 2:41:18 AM To: fpc-pascal@lists.freepascal.org Cc: Jean SUZINEAU 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

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread Jean SUZINEAU via fpc-pascal
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

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
I have my project working the way I want it to, but I have one little quirk I am hoping to fix. When I look at the clipboard, the entry for MSDEVColumnSelect has zero length. 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

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
Frb Subject: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216 On 31/12/2020 18:11, James Richters via fpc-pascal wrote: Thanks for the info on SynEdit. Where can I find the synedit source related to the clipboard? I think the link you indtended ater 'See the code at.' Didn't come

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread Martin Frb via fpc-pascal
On 31/12/2020 18:11, James Richters via fpc-pascal wrote: Thanks for the info on SynEdit. Where can I find the synedit source related to the clipboard? I think the link you indtended ater 'See the code at.' Didn't come though, can you pleaese send it again? Sorry, I assumed SynEdit would

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
Sent: Wednesday, December 30, 2020 7:51 PM To: James Richters via fpc-pascal Cc: Martin Frb Subject: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216 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 clipbo

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-31 Thread James Richters via fpc-pascal
e 16 CF_LOCALE 1 CF_TEXT 7 CF_OEMTEXT James -Original Message- 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: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216 On

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Alexander Grotewohl via fpc-pascal
: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216 On 31/12/2020 01:09, James Richters via fpc-pascal wrote: > Var > FN : LPTSTR; > > Begin > > FN:=''; > Writeln(Format_ID); > GetClipboardFormatName(Format_Id,FN

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Martin Frb via fpc-pascal
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,

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Martin Frb via fpc-pascal
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.

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Martin Frb via fpc-pascal
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

Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread Alexander Grotewohl via fpc-pascal
of James Richters via fpc-pascal Sent: Wednesday, December 30, 2020 7:09 PM To: 'FPC-Pascal users discussions' Cc: James Richters Subject: [fpc-pascal] GetClipboardFormatName causing an Error 216 I'm trying to write a programs to get data from the windows clipboard that was put

[fpc-pascal] GetClipboardFormatName causing an Error 216

2020-12-30 Thread James Richters via fpc-pascal
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