I've only ever done this like:
pcmd: string;
pcmd:='open "'+filename+'" ... '+#0;
mciSendString(@pcmd[1], ...);
mciSendString does return errors.. duno if that'll be helpful.
I originally used it in Virtual Pascal and had to make a partial header myself
so the FreePascal one might take parame
Is this for a Dymo style printer?
The easiest way you might do this nowadays is using the Windows API.. I'm sorry
for the sort of pseudo-code but I'm stuck with examples my previous work owns
so I have to paraphrase a bit:
GetDefaultPrinter (so you don't have to enumerate and then find the righ
Because += is a mistake and hopefully it's irreparably broken.
Does using just s:=s+';'; work?
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Hairy
Pixels via fpc-pascal
Sent: Saturday, October 30, 2021 11:09:49 PM
To: FPC-Pascal users
In the end we have a black box with Indy that isn't going to be opened.. and
from the sound of it, a dated method of manually checking for i/o (in this case
likely with select() and a zero timeout..). Calling that and sleep() over and
over millions of times..
I'm sorry to the OP if I'm assuming
It's best to think of these in two parts. The Windows API part and then the
interfacing with Pascal part.
SaveAsFileName.lpstrFile = long pointer to a (C) string filename buffer
This buffer isn't created for you, you provide it and tell Windows it's size.
If you were to just do
StrPLCopy( Save
The Windows API doesn't understand what an 'AnsiString' is and cannot resize it
dynamically like FreePascal would do as it is used.
You need to use something like
buf: array[0..512] of char;
TFileName.nMaxFile := sizeof(buf);
But then you should also handle the possibility that the dir is grea
-pascal
Sent: Tuesday, May 18, 2021 6:29:17 PM
To: fpc-pascal@lists.freepascal.org
Cc: Bo Berglund
Subject: Re: [fpc-pascal] How to find where my app consumes CPU?
On Tue, 18 May 2021 21:40:15 +, Alexander Grotewohl via fpc-pascal
wrote:
>if it's waiting on keyboard input you might b
if it's waiting on keyboard input you might be better off using select() for
that instead of looping and checking for keyboard input each go around.
sleep() might already do something similar with a zero timeout but even that
would probably be insufficient
--
Alexander Grotewohl
https://dcclost
There's a command line parameter.. try something like
fpc -FU~/.units.lnx yourapp.pp
Of course you would have to remember to do that for EVERY compile (I set my
text editor to do it) but you could probably add it to your fpc.cfg too.
--
Alexander Grotewohl
https://dcclost.com
_
Unfortunately from what I've read just using certain Windows APIs is enough to
get an executable flagged. Probably nothing to be too concerned about.
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of
Alexander Bunakov via fpc-pascal
Sent
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 on behalf of Jean
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:
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
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
It would seem C handles this at compile time with a define.. mapping mmap to
mmap64. Which would almost seem to imply you'd end up with a 32 bit binary that
would only work on 64 bit systems. I'm not really sure how this would work for
Pascal. You could start by looking in the file listed in the
Not 100% on this but I think the gist is that UnicodeString is compatible with
AnsiString and a conversion is done on assignment.
--
Alexander Grotewohl
https://dcclost.com
From: fpc-pascal on behalf of Ryan
Joseph via fpc-pascal
Sent: Tuesday, October 6, 2020
16 matches
Mail list logo