Jump to content

DelphiUdIT

Members
  • Content Count

    593
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by DelphiUdIT

  1. DelphiUdIT

    Delphi 12 is available

    "priceless advantages" means that for me that solution has no price ... without that I will not be able to "sell" my product. Lol ... I didn't know that are toolchains that produce native code for Python, Java and C# ... may be I'm really old ... but I'm aware for C and C++ ( ) ...
  2. DelphiUdIT

    Watch value error in Delphi 11.3

    I encountered similar problems in debugging, where some variables (mostly inline ones, but also some local ones) could not be inspected. But at normal runtime I have never encountered any problems. I use ExtractFilePath in a new project with Delphi 12 these days intensively with Threads processing millions of images and I haven't had any problems. N.B.: ... I only use English characters (plus spaces, underscores, ...) for directory and file names.
  3. DelphiUdIT

    Delphi 12 is available

    I wouldn't consider Delphi as legacy software. It is one of the few environments that produces native code, and if on the one hand this method is considered "old", on the other it offers priceless advantages. For the work I do, where longevity of applications is necessary (I deal with artificial vision in the industrial field), Delphi is perfect. Same program used by machines starting from Windows 7 up to the current 11, without intermediate frameworks that only complicate the distribution and maintenance of applications. The ease with which modern environments approach programming (see Python one for all) completely overrides the knowledge and skills of a programmer, making this world APPARENTLY simpler and more banal than it is. It is obvious that young people approach, for example, Python or Java rather than Delphi for certain types of applications (typically WEB) where with a few lines of code I have built an app that "runs" on the web. On C#, in my opinion a language between Pascal and JAVA, the choice is certainly oriented by a strong demand on the market driven by the commercial power of Microsoft which certainly makes this language more attractive for young people. And I continue, like many other companies from what I see in the various meetings both in proximity and in webinars, to develop new applications with Delphi (and with C++ for some peculiar hardware functions). I use Lazarus/FPC to support an Italian forum, but the environment, although declared universal and compatible with all available hardware and OS, is far from this dream. The IDE is also far from those of Delphi in terms of features and functionality and even the basic components provided are limited, relying completely (or almost) on third-party packages. The RTL support is incomplete, the generics are actually not usable, there is no support for themes / styles, the debugger (made entirely in Pascal) despite being more stable than Delphi's is still very crude and limited on some functionality. Last but not least, one of the big gaps is the documentation: for a beginner, finding exhaustive documentation on Lazarus/FPC is a challenge. Delphi uses the documentation created and updated over time starting from Borland and in my experience it is second only to the "exterminated" former Microsoft KB (also new environments like Android Studio have good documentation). Lazarus/FPC's strong propensity to "generalize" itself across a variety of OSes means that many features typical of a specific operating system (I'm talking about Windows in my case for example) are not available or exposed. An advantage to be attributed to it is that for Linux lovers the IDE is also available in their beloved OS.
  4. Why don't you use SIGNTOOL the free tool from Microsoft ? Look at: https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
  5. I use that flag in Delphi and in C++ in all my applications since many years, and no issue was signaled about that. But i never used it in a Windows Server environment. And I noted that since I used it no signal about application is done from Defender (SmartScreen and others) and from others Corporate AntiVirus. Some of my applications run in critical secure environment (they are digitally signed too) and I know that who use them use AV control settings set to "maximum control" like Heuristics, but I'm pretty sure that they use Windows with CFG setting in normal mode. But I was probably just lucky. Application that use CFG (really use it) is working in sync mode (the compiler takes care of autonomously inserting the appropriate code) with OS (in normal mode or in strict mode). The application can use it partially or in full environment (or none) and with CFG enable in Normal Mode (or without CFG enabled) there are no issue. In "strict mode" the OS should no load any application (or DLL) that have this flag OFF. But I don't know if in this scenario the application should really use the CFG (I think that for some API functions like LoadLibrary for example the OS should react in some way, but I have not experience). For better knowledge look at this page: https://learn.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
  6. For SEH you can look at this: https://github.com/vic4key/SEH-For-DELPHI For CFG (Control Flow Guard), you can set the flag that signal that your program adheres to, but there is not implementation in Delphi compiler (the same like @Kas Ob., I not sure about that). Put in you DPR source this line, Process Explorer will show you that the flag is activated.: {$SETPEOPTFLAGS $4000} //SET CFG ON (Control Flow Guard) For your DLL you can use this (I use it in C++): IMAGE_DLLCHARACTERISTICS_GUARD_CF("IMAGE_DLLCHARACTERISTICS_GUARD_CF", 0x4000, "Image supports Control Flow Guard.") P.S.: I DON'T KNOW HOW THESE SETTINGS WORK IN A CFG-AWARE Operating System (like Windows Server) ... you must try ...
  7. DelphiUdIT

    Removing String

    There are others variant of that function, with options to replace all occurrences and case sensitive or not. See https://docwiki.embarcadero.com/Libraries/Athens/en/System.SysUtils.StringReplace for details.
  8. DelphiUdIT

    Indy http.post with certificate: Could not load key

    For this I have no suggestions .... seems that something about server configuration (SAN reference of certificate wrong or with *) but i have not experience with this. You can try this: https://www.ssllabs.com/ssltest/ to verify the site (they expose the anomalies). Bye
  9. DelphiUdIT

    Indy http.post with certificate: Could not load key

    If the KeyFile not has any password, then event will not be trigger, but if you use a certificate you must use also the keyfile. The error you'll refer here is the original (EIdOSSLLoadingKeyError with message: 'could not load key, check password. error: 0B080074:x509 certificate routines:X509_check_private_key:key values mismatch') ? May be the KeyFile and and Certificate don't match .... Also, suggestion for usage: don't use "Method" and "SSLVersions" of SSLIOHandler together, they override each others. Use only "SSLVersions".
  10. DelphiUdIT

    Indy http.post with certificate: Could not load key

    Use a certificate with Http client is normally not needed, but If you must use it (like in authentication purpose) then you must use also use private key. (uncommented //IdSSLIOHandler.SSLOptions.KeyFile := 'privatekey.pem'; ) and in the GetPassword event write: procedure xxx.GetPassword(var Password: string); begin Password = YourPasswordForPrivateKey; end; The private key and the password of course will NOT be sent to server. Remember that the password should not hard coded in the executable, but should be ask to operator and used like a cache (expire with time or after N. use). Bye
  11. DelphiUdIT

    Theme or component??

    This is like Wedgewood Light style works in a VCL project with the standard PageControl (I dont'have Raize component). There is not any issue. May be this is an issue of TrzPageControl, but should be see how the style is implemented in that control (or if some design properties of the control are set and incompatible with style).
  12. DelphiUdIT

    Indy http.post with certificate: Could not load key

    I never use password with private key, but i think that you should use the OnGetPassword event of the IOSSLHandler that you use. Assign the correct value to "Password" parameter of the event. Bye
  13. DelphiUdIT

    Get Mac Address using Indy?

    I don't know with Indy, but in Delphi there are the WinApi.IPHlpApi e WinAPi.IPTypes that are acquired from Project JEDI. You must enumerate the Interface cards and looks for properties: Uses WinAPi.IpHlpApi, WinApi.IpTypes; var NumInterfaces: Cardinal; AdapterInfo: array of TIpAdapterInfo; OutBufLen: ULONG; begin GetNumberOfInterfaces(NumInterfaces); SetLength(AdapterInfo, NumInterfaces); OutBufLen := NumInterfaces * SizeOf(TIpAdapterInfo); GetAdaptersInfo(@AdapterInfo[0], OutBufLen); for var i := 0 to NumInterfaces - 1 do begin (* These are the 6 bytes MAC Addresses of Interfaces AdapterInfo[i].Address[0], AdapterInfo[i].Address[1] AdapterInfo[i].Address[2], AdapterInfo[i].Address[3] AdapterInfo[i].Address[4], AdapterInfo[i].Address[5] *) end; end; EDIT: This works only in Windows platforms.
  14. DelphiUdIT

    Can not install Delphi Community Edition 11.2

    He must install the community edition which is incompatible with any other installed version. I don't know how the CE tests the presence of another product, but certainly by deleting that directory you remove traces of any other licenses (which in the new versions also affects AppData\.......\Embarcadero). As per your suggestion, he could make a copy to possibly keep the data.
  15. DelphiUdIT

    Can not install Delphi Community Edition 11.2

    TAKE CAREFULLY AND UNDERSTAND WHAT YOU ARE DOING. WHAT I TELL YOU MAY DAMAGE WINDOWS INSTALLATION. DO IT AT YOUR RISK. All the paths are the standard paths, verify that you do the right thing in your installation. First, delete these folders (and all contents, YOURNAME is the name of your account): "C:\ProgramData\Embarcadero" "C:\Program FIles (x86)\Embarcadero" "C:\Users\YOURNAME\AppData\Roaming\Embarcadero" "C:\Users\YOURNAME\AppData\Local\Embarcadero" Then with Regedit utility delete these keys (and all sub): HKEY_CURRENT_USER\Software\Embarcadero HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero That's should be enough. Bye
  16. DelphiUdIT

    Delphi CE application accesses unknown IPs

    Virus Total "simply" report what append to all environment when the software run. What the SO does is not under control or analyzed from VT. I think the you can send how many applications you want to Virus Total and all of them will be signaled for those "issue". All the IP calls don't come from the software but from the common environment loaded, one hundred DLLs or more? Windows makes many IP calls for a multitude of needs, so this should not be a "meter" to measures an issue.
  17. DelphiUdIT

    Delphi CE application accesses unknown IPs

    Virus Total use virtual environment to test the application, so is possible (may be sure) that some DLL of Windows environment call Internet location to do something (think about SmartScreen that search for information about executable). So, that is not a Issue (and Virus Total list only one of many antivirus engine to exploit that). Bye
  18. DelphiUdIT

    Parnassus Debugger Issue

    Rad Studio 12. Windows 11 23H2 Parnassus Debugger and Core are installed from GetIt (date 13 November 2023). I have issues with Parnassus debugger like in the past. Create a blank project and start it with debugger. Close the executable and then close the IDE ... an AV is raise multiple times until you end that with task manager. But ... If you close the project (close all) from IDE and then close the IDE then no AV is raised. If none has suggestions i will signal that to QP.
  19. DelphiUdIT

    Parnassus Debugger Issue

    There is already an internal report for this Issue.
  20. DelphiUdIT

    Bringing the IDE automatically to the foreground?

    I don't think there is a good solution (some hacks surely). But I think the choose of Microsoft is a good solution. If are writing something in your TextWriter I don't think you liked that another application start in foreground (and maybe you write on it causing disaster). When I use an application I really don't desire that another application popup in front ....
  21. DelphiUdIT

    Quality portal access gone for me ?

    For me is offline now, but @Dave Nottage said that there are 48 hours of "down" ... so may be tomorrow it will alive again.
  22. DelphiUdIT

    Bringing the IDE automatically to the foreground?

    That are the documentation for the SetForegroundWindow ... https://learn.microsoft.com/it-it/windows/win32/api/winuser/nf-winuser-setforegroundwindow I think the the link view it in Italian (my language) ... but you can easy make a search in your language. Of course this is for an application, but the IDE is an application so the rules are those. Bye
  23. DelphiUdIT

    Pulling all files and folder names into a list

    The dir command redirect on file (not on screen) stay near 2 seconds to list 141792 files in 14500 directories, the Delphi code stay 339 millisec. ... with Delphi 12 ... Over that was for the cache operations.... without cache the Delphi code and dir command (on file) are exactly the same (1,9 sec.) On Windows directory the code (and dir at the same time) the time was 6.8 sec for 170500 files and 85000 directories.
  24. DelphiUdIT

    "CAN" bus advice

    I have never used their hardware directly, but I have worked on several systems where these were used (they used canbus motors to move the cameras) and I know that the basic APIs were used. The systems have always worked without any problems (I have made about a hundred).
  25. DelphiUdIT

    "CAN" bus advice

    You can start from here, they should have something for canbus (their hardware, PEAK CANBUS): https://www.peak-system.com/PCAN-Basic.239.0.html?&L=1&gclid=EAIaIQobChMIhOuR_8C6ggMVvJKDBx08TgQbEAAYASABEgLiAvD_BwE
×