Questions tagged [delphi-run-time-library]

6 questions
4
votes
2 answers

Delphi FreeAndNil: Looking for an alternate implementation

NOTE: Bear with me, I feel a little "flame grilled" due to some discussions over here and here and some issues I reported here and here. Some background Ye olde (pre 10.4) FreeAndNil looked like this: FreeAndNil(var SomeObject) The new and fresh…
2
votes
1 answer

Remove non-numeric characters from string in Delphi

I have these three functions that successfully remove all non-numeric characters from a given string: The first function loops through the characters of the input string, and if the current character is a number, it adds it to a new string that is…
Shaun Roselt
  • 1,650
  • 5
  • 18
  • 44
2
votes
1 answer

THTTPClient Get to a TLS 1.3 only site results in an error

This code: uses System.Net.HttpClient; procedure TForm2.Button1Click(Sender: TObject); var LHTTP: THTTPClient; LResponse: IHTTPResponse; begin LHTTP := THTTPClient.Create; try LHTTP.SecureProtocols := [THTTPSecureProtocol.TLS13]; …
Dave Nottage
  • 3,411
  • 1
  • 20
  • 57
2
votes
2 answers

win64\debug\dsnap.dcp appears to be outdated

When compiling my runtime libs with Rad studio Tokyo 10.2.3 I get a 'package dsnap needs to be recompiled' error if a package or exe actually depends on it. I found out it is due to the dsnap.dcp in my $(BDSLIB)\win64\debug folder. The workaround is…
H.Hasenack
  • 1,094
  • 8
  • 27
1
vote
1 answer

How to get yesterday date in Delphi

I know you can get the current time using the Now() function, but how would you get the date of yesterday?
user18316498
1
vote
0 answers

Long running Rest API calls withTHTTPClient

To listening of events from a Rest server I need a long running HTTP request. How we do that with Delphi? My current solution works but the stop of the request from the caller side is not solved properly. I have to stop the thread by using…