-
Content Count
2062 -
Joined
-
Last visited
-
Days Won
38
Everything posted by Angus Robertson
-
I use this function to disable and reanable all controls in a container: procedure EnableOrDisableChildren (Container: TWinControl; Enabled: Boolean) ; var index: integer; aControl: TControl; isContainer: boolean; begin for index := 0 to -1 + Container.ControlCount do begin aControl := Container.Controls [index] ; isContainer := (csAcceptsControls in aControl.ControlStyle) ; if NOT isContainer then aControl.Enabled := Enabled; //recursive for child controls if (isContainer) AND (aControl is TWinControl) then begin EnableOrDisableChildren (TWinControl (aControl), Enabled) ; end; end; end; Angus
- 24 replies
-
- rad studio 11
- delphi
-
(and 1 more)
Tagged with:
-
ftp Unable to use \\?\ in OverbyteIcsFtpMulti
Angus Robertson replied to Mimiko's topic in ICS - Internet Component Suite
All those checks for ? relate to non-unicode compilers converting UTF8 file names to ANSI with substitutions for bad characters, so I've made them conditional on a new property that will need be enabled for Delphi 2007 and earlier to get the same 'Skipped Inaccessible Unicode Name' error. Angus -
ftp Unable to use \\?\ in OverbyteIcsFtpMulti
Angus Robertson replied to Mimiko's topic in ICS - Internet Component Suite
Thanks, I'll look at this for next release due this week. Angus -
You would be better to avoid using LineMode if the lines are 'unusual', always read all received data, buffer it, and check for end of line/row/packet yourself, which can be multiple methods. That is what the TIcsIpStrmLog component does, but you may need to copy the code to add more flexibility. Angus
-
Of course TWSocket can be used for HL7, but using TIcsIpStrmLog requires a lot less code. OverbyteIcsAppMonSrv.pas even parses the | delimited fields. Angus
-
Never heard of HL7, but it looks like a simple ASCII protocol, one line at a time. I'd suggest you use the TIcsIpStrmLog component in TCP Server mode which has an onRecvEvent that returns a simple line at a time, you can define the line end in various ways. The main sample is OverbyteIcsIpStmLogTst,dpr that sends and receives lines of data, including to itself. ICS V9,4 adds a new component OverbyteIcsAppMonSrv.pas that handles a text protocol very similar to your example with | as field separators, communicating between different ICS applications, with a new sample IcsAppMon.dpr use the server component to collect information from multiple clients and return information those clients. Angus
-
REST Datasnap Server Accepting ECDH Ciphers
Angus Robertson replied to MikeMon's topic in Network, Cloud and Web
I'm aware Indy officially only supports OpenSSL 1.0.2, but that version would never give the reported error message mentioning BoringSSL, so something unusual is happening here. Angus -
REST Datasnap Server Accepting ECDH Ciphers
Angus Robertson replied to MikeMon's topic in Network, Cloud and Web
The reference in the error to BoringSSL is interesting, this is a Google fork of OpenSSL that is now incompatible with OpenSSL due to the many changes Google has made, but OpenSSL is currently adding BoringSSL Quantum ciphers to the next release of OpenSSL, so it goes around in circles. No-one can advise you on new ciphers without knowing which specific version of OpenSSL (or BoringSSL) you are using. For instance, the CHARH20/POLY1305 ciphers were not in older versions of OpenSSL. I did a quick search of my Embarcadero directories and can not find any OpenSSL DLLs. Angus -
Wordpress upload media
Angus Robertson replied to George Bairaktaris's topic in ICS - Internet Component Suite
Adding: HttpRest.RestParams.AddItem('filename', 'anyname.jpg'); would be normal, with the real name of the file, not the path. Most servers expect the name of the file in the parameters, not the request headers. And telling the server you are sending JSON content when are you not, is just wrong. But at least it works. Angus -
Wordpress upload media
Angus Robertson replied to George Bairaktaris's topic in ICS - Internet Component Suite
Extracts of code assume I'm familiar with those applications, I am not. I asked for the request headers and body content sent, so I know what these applications actually send to the server. Angus -
The next release of ICS is finished, in SVN and the overnight zip. Once documentation is finished, it will be release next week. Meanwhile, testing of this version would be appreciated, so any serious problems can be found and fixed before the release. I'd particularly like C++ users to try and install it, it's okay for Win32, but getting some missing symbols for Win64, despite adding them. Angus
-
ICS V9.4 due early February 2025
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
Due to planned OpenSSL security releases 11th February, I'm postponing the next release until those versions are bundled and tested with ICS V9.4, hopefully later that week. Meanwhile. I'd really appreciate feedback on V9.4 in the overnight zip, just saying you are using it is good, might avoid fixes needed due to bugs I've accidentally introduced. And specifically C++ users, as mention In the last message, so it can be installed by GetIt. Angus -
Wordpress upload media
Angus Robertson replied to George Bairaktaris's topic in ICS - Internet Component Suite
The fact you can use Curl or Postman is not relevant to whether ICS works, it will with the correct parameters. I've looked at the Wordpress document, and tried some of the examples against a WordPress site I manage, and just get 404 errors, but it is WP 5.2.21 and I'm not the admin, so maybe the APIs are different or I'm not allowed to use them. The documentation example for 'create a media item' is ' POST /wp/v2/media' so absolutely useless. I don't know Curl either so no idea what --data-binary does. If you can post the actual http headers, body and response made by Curl or Postman, that should explain what is actually happening. Angus -
bug in OverbyteIcsWSocket.pas.DataToString()
Angus Robertson replied to merijnb's topic in ICS - Internet Component Suite
Thanks, now fixed, That function is only used for diagnostic dumping of SSL packets, which I never use due to massive logs. Angus -
Send a custom error document for 404 Not Found ?
Angus Robertson replied to Incus J's topic in ICS - Internet Component Suite
The ICS web server should probably offer an event to make creating customised error pages easier, I've put it on the wish list. Our error pages are very minimal. Angus -
Send a custom error document for 404 Not Found ?
Angus Robertson replied to Incus J's topic in ICS - Internet Component Suite
If you are stuck using an old version, which is understandable for old compilers, why not just customise the Answer404 function? Angus -
Wordpress upload media
Angus Robertson replied to George Bairaktaris's topic in ICS - Internet Component Suite
You have not explained how you are attempting to upload the file, what parameters the server is expecting, nor the URL, nor the result of logging from the progress event which would make some of your errors obvious. The OverbyteIcsSnippets sample has two upload examples, doHttpSimpleUploadClick builds Json command line parameters, HttpUploadFile = file, and HttpUploadStrat := HttpUploadSimple; to POST a binary file, while doHttpFormUploadClick builds a form with a file as a parameter. Your code is similar to the second snippet, but is missing several lines such as RestParams.PContent := PContFormData and has all those ExtraHeaders that duplicate the headers addiws by the component, and which might be the reason for the 500 error. Angus -
Delphi ICS HttpServer +socket
Angus Robertson replied to Taki04's topic in ICS - Internet Component Suite
Are you using an old version of ICS? ICS added full Websocket server and client support two years ago, and handles the upgrade negotiation process automatically. The main unit is OverbyteIcsWebSocketSrv.pas which contains a derived connection class THttpWSSrvConn that handles the Websocket protocol. There are two samples OverbyteIcsSslMultiWebServ.dpr and IcsAppMon.dpr that show how it all works. Angus -
Why not just execute the stored procedure from Delphi? I don't have any SQL statements in Delphi applications, just build the stored procedure parameters and use the ADO Execute method which returns a DataSet RecordSet that I parse for various results. It means you can test all your SQL outside of Delphi. Angus
-
Delphi & HTTP Authentication: Basic and Digest Access Authentication
Angus Robertson replied to msd's topic in Network, Cloud and Web
Assuming you've missed a newline after http/1.1, this looks is standard authentication, any proper library should handle it, ICS certainly should. Angus -
Problem at execution time in OverbyteIcsHttpProt
Angus Robertson replied to Passama's topic in ICS - Internet Component Suite
Are you using a new or ancient XE7 version of ICS? It sounds like the TSslContext component has got lost. Angus -
TDirectory - file lock out on Win 10 LTSC
Angus Robertson replied to Roger Cigol's topic in General Help
I wrote an open source component that indexes Windows directories and files recursively, written 20 years ago and used on every version of Windows and Delphi since, it just works, never fails. It currently builds a list of 1.2 million files on my c drive which it compares with the same number on a second drive, for backup on Windows 11. Angus -
sslHttpCli - the program freezes after executing the request
Angus Robertson replied to iddqd345's topic in ICS - Internet Component Suite
There is a fix for this freezing problem in SVN, will be zipped later tonight. ICS went into an endless loop if SSL data was received after close down was completed but before the handles were reset. Found against a recent Nginx web server release, The SSL code is almost unchanged in 15 years, so not sure why the problem has not shown up before, it seems to happen with both TLSv1.2 and TLSv1.3 so does not seem to be protocol related. Angus -
Listview or similar with multi select and columns
Angus Robertson replied to softtouch's topic in FMX
Think FMX TStringGrid is your closest bet, I've used it to replace TListView. But no obvious multi-select, Perhaps you can do the TListView VCL trick of drawing tick boxes in the first column and checking mouse events to 'select' them. The lack of many matching VCL components does make FMX conversions a pain. Angus