Leaderboard
Popular Content
Showing content with the highest reputation on 02/13/25 in all areas
-
New Book Delphi Quality-Driven Development
Dalija Prasnikar posted a topic in Tips / Blogs / Tutorials / Videos
This year, on February 14th, Delphi celebrates its 30th birthday. Over the past three decades, Delphi has proven to be a robust and versatile development environment, empowering developers to build high-performance applications with ease across multiple platforms: Windows, Linux, Android, iOS, and macOS. As we commemorate this milestone, I am also introducing a new book to help guide you into Delphi's fourth decade: Delphi Quality-Driven Development - A practical guide to testing and writing testable code. Useful to lone developers and vast teams alike, this book aims to demonstrate a variety of essential practices and techniques for making high-quality, testable code. There is a 25% sale going on until the end of February for the Delphi Quality-Driven Development ebook, and there you can also get an additional discount on other books if you add them to your order. https://dalija.prasnikar.info/delphiqdd/index.html To all my fellow Delphi developers: May your code compile quickly, your memory be manageable, and your code testable. -
ICS V9.4 has been released at: https://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10, 10.1, 10.2, 10.3, 10.4, 11 and 12 and C++ Builder 10.4, 11 and 12. ICS supports VCL and FMX, Win32 and Win64 targets. The distribution zip includes the latest OpenSSL 3.0.16, 3.2.4, 3.3.3 and 3.4.1 for Win32 and Win64. Changes in ICS V9.4 include: 1 - Completed the ICS Application Monitoring system added in V9.3, designed to locally and remotely monitor ICS servers and applications, and to locally restart applications on demand or if they crash. It comprises a small TIcsAppMonCli client monitoring component that is added to ICS applications, usually Windows Servers, but also client applications. This client component communicates with a TIcsAppMonSrv server component, usually running as a Windows Service on the same server so it is able to restart applications, but can also support clients on a LAN. The monitoring server has web and Websocket servers, allowing remote browsers to view the state of all applications being monitored by the server with a continually updated web page. There is also ICS Application Monitor - Remote Manager application that provides remote monitoring of multiple ICS Application Monitor servers using Json web and Websocket requests on a single screen. 2 - The SMTP client component fixes a bug introduced in V9.3 which could corrupt the Content-Transfer-Encoding header line. 3 - In TWSocket, fixed a potential problem using multiple threads where a new connection opened very quickly (ie localhost) and then stalled due to an unexpected connection state. Made DataToString Unicode compatible, only used for diagnostic dump logs. 4 - In the HTTP client, fixed a check for an overflowing buffer when receiving very long headers that could cause failure detecting headers end. Made several URL validation functions public: GetProtocolPort, IsSSLProtocol, IsKnownProtocol and IsKnownProtocolURL. 5 - When creating PKCS12/PFX certificates, change the 3DES cipher to AES256 if the legacy provider is not loaded. 6 - In the TIcsFtpMulti component, skip download of zero length file by creating an empty file, previously this got SSL handshake error. Don't report directories as being downloadable, they are not. If extended passive mode allowed, send EPSV ALL at start so firewalls and NAT routers can handle sessions more efficiently. Added CheckBadUnicode property defaults to false, so that checks for bad Unicode to Ansi conversions with ? are skipped, allowing more complex paths without errors. 7 - The FTP server FEAT request now returns EPRT and EPSV which have been supported for IPv6 for years, but were not advertised for IPv4. 8 - The OverbyteIcsSnippets sample adds two new simple REST snippets to Get/Post Parameters that send them to an ICS server, and the server echoes back those params so you can check what was actually sent. 9 - When loading the OpenSSL DLLs, no longer check they are digitally signed for Windows XP, 2003, Vista and 2008, they don't recognise SHA-256 code signing, never tested since no longer have those old versions available. 10 - The TRestParams method AddItemSO to add a SuperObject now has an Escape parameter defaulting to True, so non-ASCII characters are escaped by default. 11 - The Proxy component TProxyTarget now has a SocketFamily property so target connections can be restricted to TSocketFamily values. Added property SrvTotSess count of server session connections for logging. 12 - In the HTTP Application Web Server, fixed a memory leak with multiple virtual PUT and POST documents. 13 - The OverbyteIcsJoseTst sample 'Sign/Verify Data' tests now support hashes other than SHA-256, selected from the Key and Signing Hash Algorithm drop down list. Also, a private key matching that selection is created automatically, including X25519. 14 - There is a new unit OverbyteIcsWinUtils that contains Windows API functions, built from selected Magenta Systems libraries, with functions needed to build and control Windows Service applications, accessing the Windows registry, Windows firewall, Windows tasks, hardware, and with simple encryption for passwords. Most of these functions are used by the TIcsAppMonSrv server component and IcsAppMon sample, but should have much wider use for Windows Service server applications in particular, like allowing firewall access. It's planned to move most other Windows specific function here for ICS V10. 15 - In the ICMP component, fixed a problem setting property PingMsg to the text to ping. 16 - In the TIcsIpStrmLog component, added method ListenStates which for logprotUdpServer and logprotTcpServer returns a multiline string listing the IP, port, SSL and state of all socket listeners. The CurSockets property now reflects actual TCP Server clients. 17 - In the TIcsMailQueue component, don't keep retrying email that is too short to send with no body or with no sender headers. Added more error handling if the SMTP component fails to build the EML spool file. 18 - In OverbyteIcsUtils, finished the cleanup of old Base64 functions by adding new IcsBase64 functions using TBytes internally to replace old Base64 functions that used AnsiChars, with no overloaded versions for simplicity. Old Base64 versions retained as deprecated for user applications, please update to the IcsBase versions. Added IcsTBytesCompare to compare two TBytes. Added IcsOutputDebugStr for Posix and Windows. Added IcsDateToAStr and IcsDateTimeToAStr with alpha month (Jan/Feb). 19 - The ICS C++ packages for C++ 10.4 and later have been updated with the correct paths for the three supported platforms, and all build and install correctly for Win32. Win64 should also build, but not Win64x Modern which needs fixes in a future release of C++ 12. The release notes for V9.4 are at https://wiki.overbyte.eu/wiki/index.php/ICS_V9.4 All ICS active samples are available as prebuilt executables, to allow ease of testing without needing to install ICS and build them all. There are four separate zip files split into clients, servers, tools and miscellaneous samples which can be downloaded from https://wiki.overbyte.eu/wiki/index.php/ICS_Samples Angus
-
New OpenSSL releases 3.0.16, 3.2.4, 3.3.3 and 3.4.1 and new resource files linked by ICS
Angus Robertson posted a topic in ICS - Internet Component Suite
OpenSSL has released maintenance versions of the four currently supported versions, 3.0.16, 3.2.4, 3.3.3 and 3.4.1. There is one high security fix for 3.2 and later relating to Raw Public Keys (RPKs), but these are disabled by default and not yet used in ICS, and a low level timing side-channel in ECDSA signature computation fix that needs hardware access to exploit. These OpenSSL versions are included with the final ICS V9.4 release. Windows binary zips are available from https://wiki.overbyte.eu/wiki/index.php/ICS_Download or https://www.magsys.co.uk/delphi/magics.asp In addition to the three DLL files, the zips include compiled RES resource files that contain the same DLLs, text files and version information, see the RC file. The RES file may be linked into application EXE files and code then used to extract the DLLs from the resource to a temporary directory to avoid distributing them separately. ICS V9.1 and later optionally support loading the resource file. Beware OpenSSL 3.4 exposed a minor ICS bug creating X509 certificate requests and creating CA signed certificates, which is fixed in V9.4. or a one line change for earlier versions. Also note when building the ICS packages for the first time with 3.4, there may be a dialog 'entry point could not be located', because the new DLLs are only extracted from the resource files when the first application is run, but the packages have built OK. ICS V9.4 defaults to using OpenSSL 3.4.1, provided the new OverbyteIcsDefs.inc files is installed, with an earlier version optional by changing the Defs file. Angus -
That is correct. In your current situation Application.ProcessMessages serves one main purpose; To fix your queued windows messages issue. Rightfully so @Anders Melander mentioned that it is a way to fix that because it disposes of the queued windows messages that were destined for the disabled controls. But your code has the ability to produce another "artifact" and that is an unresponsive GUI while the lengthy operation is taking place (when the result of WaitFor takes a a little longer to arrive). Application.ProcessMessages where you placed it will not fix that because the possible occurance of a longer-than-usual WaitFor happens before Application.ProcessMessages. Your GUI will be unresponsive wile the WaitFors take place. As @Remy Lebeau mentioned; you can use Indy's TIdAntiFreeze to fix the unresponsive GUI issue but it only works while the WaitFor is being processed. So you can place the following into a thread (obviously with modifications to handle thread-safety and other things as required) : if fTCPClient.Connected then begin fTCPClient.IOHandler.WriteLn('set OutputType=ASCII_SHORT'); if fTCPClient.IOHandler.InputBufferIsEmpty then begin for i := 0 to 1 do myStr := myStr + fTCPClient.IOHandler.WaitFor(Char($0A), True, False, IndyTextEncoding_ASCII, 5000); end; end; You have to remember that that thread will now leave your main thread and GUI free to continue and this will be evident in any Buttons, Menus, "interactions" being available for the user to click on unless you specifically disable them. You also have to have some result for the thread which means as soon as the WaitFors finish and you have your answer from the TCP then you should obviously react by passing the resulting String to the main thread, enable all that needs to be enabled again, continue with whatever you still wanted to do, etc.
- 24 replies
-
- rad studio 11
- delphi
-
(and 1 more)
Tagged with:
-
New Book Delphi Quality-Driven Development
Tom Chamberlain replied to Dalija Prasnikar's topic in Tips / Blogs / Tutorials / Videos
Ordered the paperback from Amazon to go with the other 3 on my bookshelf, after I read it of course. -
What new features would you like to see in Delphi 13?
Rollo62 replied to PeterPanettone's topic in Delphi IDE and APIs
What features are most wanted: Under all platforms (Win32, Win64, Macos, iOS, Android, Linux, ...) I would wish to have - A debug experience, that is reliable and shows and behaves consistently under all platforms - A rock solid debugging function, with at least breakpoint, step-over, step-into ... likely the full feature set - A rock solid and consistent debug inspection view, with ability to show on mouseover or inspect, for all structures in the same way - A debug inspection view, that is able to decode all sub-structures of classes or records correctly and is fast and easy to access its underlaying members - A debug inspection view, that defaults to human readable data representation first, while there were options to watch single variables in many views. - A debug inspection view or watch, that can reliably switched between decimal or hex view at least (and even more integer/hex/string/byte array,pointer,... ) - A debug inspection view or watch, maybe on the breakpoint level, that can define the preferred view representation of the current session permanently, for all different views (hoover, inspect, watch,...) The Win32 behaviour is more or less the best reference so far, while other platforms are still not there. -
New Book Delphi Quality-Driven Development
Rollo62 replied to Dalija Prasnikar's topic in Tips / Blogs / Tutorials / Videos
Nice, now I have something very interesting to read in the next cold winter days The whole payment and download experience with PayHip was also extraordinary pleasing, I can recommend that. -
What new features would you like to see in Delphi 13?
HeartWare replied to PeterPanettone's topic in Delphi IDE and APIs
Which is why I suggest a mode that works internally in 96dpi but shows (and allows edit) in the monitor's native DPI. Yes, it will mean that you are restricted to placing components on a 2x2 grid if your monitor is at 200% and the grid will be unsymmetrical if you're at 150%, but since all components will be locked into the same grid, you can still align the positions and sizes. -
Multithread and thread-safe TClientDataSet?
Anders Melander replied to snodev's topic in RTL and Delphi Object Pascal
Yes. I think you should drop the idea of the workers writing to a dataset. Write to a lock free queue instead and then read from the queue from a separate thread.- 5 replies
-
- delphi
- tclientdataset
-
(and 1 more)
Tagged with:
-
Indy has a TIdAntiFreeze component that processes pending UI messages during blocking socket operations. This would allow the WaitFor() call to process messages while waiting for the data to arrive. Though, that wouldn't address the case where the button click occurs after the last WaitFor() call had already exited but the panel hasn't been enabled yet.
- 24 replies
-
- rad studio 11
- delphi
-
(and 1 more)
Tagged with:
-
Yes it will. The reason it will not pump messages is that it's not being given an opportunity to do so. This is the equivalent: Button.Enabled := False; Sleep(1000); Button.Enabled := True;
- 24 replies
-
- rad studio 11
- delphi
-
(and 1 more)
Tagged with: