DelphiUdIT
Members-
Content Count
639 -
Joined
-
Last visited
-
Days Won
14
Everything posted by DelphiUdIT
-
File install path in Android (Deployment Manager)
DelphiUdIT replied to PhxMarco's topic in Delphi IDE and APIs
This is the right place, see: https://docwiki.embarcadero.com/Libraries/Athens/en/System.IOUtils.TPath.GetHomePath So your files go to on the home directory or in the subfolder of that like you see. -
File install path in Android (Deployment Manager)
DelphiUdIT replied to PhxMarco's topic in Delphi IDE and APIs
Have you tried in your deployment settings to set the remote path to: '.\databases' -
Specification IEEE P1363
DelphiUdIT replied to TurboMagic's topic in Algorithms, Data Structures and Class Design
I don't have any pubblication about that, but this site use and have an implementation about this standard, may be can help: https://github.com/miracl/MIRACL/tree/master/source/p1363 -
Desktop App Development with Object Pascal
DelphiUdIT replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
Hi, if your goal is to be able to "take control" of the project, modify it and implement it with new features, I must warn you that it is an operation that even a senior programmer generates some anxiety. Pascal, and DELPHI in particular, helps you in this and therefore your work will certainly be "lighter". To be able to do this, in the absence of any information about you, there is a series of activities to be carried out preliminarily (what you call a roadmap): 1) Know the basics of Pascal, and by basics I mean the structure of a Pascal program, in particular how it is implemented in Delphi, and its composition; 2) Definitions, variables, constants; 3) Operators (logical, mathematical); 4) Assignments and comparisons; 5) Numbers, characters, variants; 6) Vectors and matrices; 7) Structured data, sets; 8 ) Procedures and functions; 9) Pointers; To then move on to OOP: 10) Basic OOP concepts (encapsulation, abstraction, inheritance, polymorphism); 11) Classes, constructors and destructors; 12) Exceptions; 13) Properties and events; 14) Multithreading; 15) Life and purpose of "variables" or object instances; 16) Memory management; 17) Files, streams; 18) RTL and RTTI; xx) Generics and collections; and lastly (so to speak) to the VCL, if you want to stay in the classic Windows application or in FMX if you want to go towards the environment more dedicated to the Mac, Linux and mobile worlds (Android and IOS), also functional for Windows: 19) Basic VCL classes (TObject, TPersistent, TComponent, TControl); 20) Ownership and parentship; 21) Graphics: TCanvas and handles; 22) Generics and collections; Another topic, really expanded and I would say almost a world in itself are databases ... Delphi has a good library (FireDac) that allows very easy access to most modern and not modern databases. Within all this there should also be a smattering of how the IDE works, already as a "ZERO" chapter as it will be needed to be able to carry out all these points. In conclusion I do not know if there is a specific publication that allows you to do all this, if not it will be necessary to read various publications to allow you to operate safely in the project. This is as far as I think it is necessary, maybe someone else certainly has some additional information or a different path in mind. If the forum members want to provide you with some links on this ... Bye -
Desktop App Development with Object Pascal
DelphiUdIT replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
Normally it works the other way around... you write: {$IFDEF FPC} .... for FPC {$ENDIF} {$IFNDEF FPC} .... for DELPHI {$ENDIF} or {$IFDEF FPC} .... for FPC {$ELSE} .... for DELPHI {$ENDIF} -
Desktop App Development with Object Pascal
DelphiUdIT replied to PhilBoy's topic in Algorithms, Data Structures and Class Design
You can start from here: https://lp.embarcadero.com/ObjectPascalHandbookD11?utm_source=blog It is a free book from Marco Cantu. Other members of this forum may suggest you others books or resources. EDIT: and of course install the community edition of Rad Studio from here (if you are eligible for it): https://www.embarcadero.com/products/delphi/starter N.B: Take care about license, limitations and legal issue -
If you use the OpenSSL 1.1.1 or 3.1.x, I suggest to use this: //CipherList are used in TLSv1_2 CipherList := '!EXPORT:!LOW:!aNULL:!eNULL:!RC4:!ADK:!3DES:!DES:!MD5:!PSK:!SRP:!CAMELLIA'+ ':ECDHE-RSA-AES256-GCM-SHA384'+ ':ECDHE-RSA-AES128-GCM-SHA256'+ ':ECDHE-RSA-CHACHA20-POLY1305'+ ':ECDHE-ARIA256-GCM-SHA384'+ ':ECDHE-ARIA128-GCM-SHA256'+ //Weak !! but necessary for old products ':ECDHE-RSA-AES256-SHA384'+ ''; //CipherSuites are used in TLSv1_3 CipherSuites := ''+ 'TLS_AES_256_GCM_SHA384'+ ':TLS_CHACHA20_POLY1305_SHA256'+ ':TLS_AES_128_GCM_SHA256'+ ':TLS_AES_128_CCM_8_SHA256'+ ':TLS_AES_128_CCM_SHA256'+ ''; If you use only old OpenSSL 1.0.2u (limited to TLS 1.2): CipherList := '!EXPORT:!LOW:!aNULL:!eNULL:!RC4:!ADK:!3DES:!DES:!MD5:!PSK:!SRP:!CAMELLIA'+ ':ECDHE-RSA-AES128-GCM-SHA256'+ ':ECDHE-RSA-AES256-GCM-SHA384'+ ':ECDHE-RSA-CHACHA20-POLY1305'+ ':ECDHE-ARIA256-GCM-SHA384'+ ':ECDHE-ARIA128-GCM-SHA256'+ //Weak ':ECDHE-RSA-AES256-SHA384'+ //To use this two you must generate the DHPARAMS file with OpenSSL utility //':DHE-RSA-AES128-GCM-SHA256'+ //':DHE-RSA-AES256-GCM-SHA384'+ '';
-
My personal opinion is that having too many discussion points on a single topic is counterproductive. Having n. Forums, githubs and maybe personal blogs could be dispersive for the information and discussions that you want to "carry forward". And in this particular case, the main actor that is Remy should disperse a lot of energy on a multitude of discussion "sites" (which in fact he already does). The idea is not "evil", but there are already several possible discussion points (for example one of these is this forum) with a dedicated section.
-
You will have the options enabled (TIdOpenSSLIOHandlerServr.Option) with: TLSVersionMinimum := TIdOpenSSLVersion.TLSv1_2; TLSVersionMaximum := TIdOpenSSLVersion.TLSv1_3; If you want you can test with SSL Labs https://www.ssllabs.com/ssltest/ the basic HTTPS server made with Indy 'cloud.dyn-o-saur.com' (it's down now, tomorrow in the morning (CET) will be online again). It works with OpenSSL 3.1.4 No, I don't have any. I always deleted the bundle version and install the github version. The bundle compiled files (Bpl, Dcu, etc ...) are in the same paths of delphi system libraries, I think you must move them from there. So you must maintain them and the github version switching the windows registry. I think that @shineworld has done those steps.
-
As far as I know, Windows loads DLLs without checking if the module is already loaded in memory ONLY if the DLLs are "pointed" with the full path. So in his case one of the solutions I see is that his program loads the 2005 DLLs of your old modules first and then the new ones of 2019 with Indy with the full path (maybe with the new DLLs in a directory outside the system path). He must therefore prevent Indy from loading its libraries first. Was there (from memory) the possibility of loading Indy DLLs in a delayed way ?
-
Yes, you are right, I expressed myself badly. I meant Main Form. Since he wrote that he was a beginner I implied that Form1 was both the first Form and the main one (it is generally both the first Form and the main one when you create a new project with Delphi). But of course is better to talk with the correct terms.
-
Remember, YOUR FIRST FORM should always be alive, don't close, free or release it. If you close your FIRST Form, the application also terminate. In your example, when you'll exit from Form2 your application will close. And it would have closed even if I had used the Show method instead of ShowModal. If you need to "hide" the main Form use the Hide method. For other Forms (not MDI) you can also use the Close method ... as a default action the Form will be hidden (i.e. put in HIDE state). https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Forms.TForm Bye
-
In the "Project/Deployement" window you can set the files that you don't want overwrite (deploy) ("ovewrite" column options). By default all newer local files will be deployed and overwrite the remote ones. Bye
-
On your question, I think that all other people said a lot. Speaking of console programming, a GUI program is not very different: apart from the graphical interface, many times the logic behind the program is in fact programming that has nothing to do with graphics. Threads, tasks, mathematical processes, data processing are generally algorithms and developments totally detached from the GUI. In these cases, there is not much difference between a console program and a graphical program. The "graphical" part facilitates and simplifies some tasks, which otherwise in a text-only interface would be difficult anyway. I'll give an example that may not be exactly right, but in my opinion it gives the idea: those who know Linux have certainly used the "top" utility which is a totally console program. A comparison in Windows could be the task manager, leaving aside the functional details I would say that using the task manager is more "user friendly" than "top". The background works is nearly the same, presenting all the "applications" with their respective execution peculiarities (occupied memory, CPU usage, process identifier) and the possibility of performing some actions (terminate, suspend, etc ...). For the applications that I develop, the graphic part is necessary, but in fact it is totally disconnected from the 80% of the rest of the application in which I have to perform analysis (between deep learning and classical mathematics), communication logic and process control and management.
-
Adding basic AWS S3 operations to Delphi app
DelphiUdIT replied to Paul Dardeau's topic in Network, Cloud and Web
Never do this, but you can try starting from AWS SDK for Delphi 1.1.0 , you find it in GETIT. Bye -
New Code Signing Certificate Recommendations
DelphiUdIT replied to James Steel's topic in General Help
I think we are taliking about certificate on hard token like new stardard impose. You cannot have a private key in any way in a file. The last example proposed in the link by Anugs try to use the private key on USB (using a undocumented feature) and a certificate on file (DER format). This doesn't work on Certum. It will always ask for a PIN and if you use the /CSP parameter with undocumented features, it say "the token is not compatible with request operation, try another token". -
New Code Signing Certificate Recommendations
DelphiUdIT replied to James Steel's topic in General Help
By now, like I write in another thread, I use Certum (since two days ) and they are compatible with the Windows certificate store. Of course they install they own drivers, but without calling them directly all applications view the certificate and can use it. -
New Code Signing Certificate Recommendations
DelphiUdIT replied to James Steel's topic in General Help
For Certum (ACS ACR40T), this doesn't work. -
Code signing certificates have become so expensive...
DelphiUdIT replied to RaelB's topic in Delphi Third-Party
I finally received the EV certificate. It was an exhausting journey, where every day the certification body (Certum) asked me for a document, a clarification or something else. Having to follow the complete path (I had never purchased any certificate from them) they rightly verified everything and even more than everything. The installation of the certificate (keys and certificate itself) on the hardware key was done through their control panel via browser in two stages. Everything worked the first time and the cost was in line with that of direct competitors (at least for the three-year solution). The hardware key is seen directly through the "storage" of Windows certificates and so the certificate is visible and usable by any application. In the Rad Studio IDE I inserted a new Tool (under "tools menu") that allows me to immediately sign the executable file (or DLL) compiled from the project. Now the second step is to verify with Microsoft the pairing for signing the drivers. -
Is TBitmap.LoadFromStream blocking when used in a BG thread?
DelphiUdIT replied to domus's topic in FMX
TBitMap is Thread Safe since Tokyo release: https://docwiki.embarcadero.com/RADStudio/Tokyo/en/Multi-Threading_for_TBitmap,_TCanvas,_and_TContext3D Of course this doesn't means that it doesnt'use main thread in sync way. -
Please, post some minimal code. You use TLS ... are you put in the directory of you app the openssl dll (x86 or x64) version 1.0.2u (the last pubblic free version supported by Indy in bundle version of Rad Studio) ? EDIT: I posted here a Demo from Indy with FTP and SSL working. Inside there are the right openssl DLLs 1.0.2u for x64. You can replace them of course if you don't trust. I don't remember if this is the original demo code or I changed it to works with TLS. FTP.zip
-
I am curious to know the reason why to develop such a large amount of technology in a mobile application. Development environments (SDK Android, IOS, Google, etc ...) are not stable over time and change very quickly based on the release of the OS. This forces continuous maintenance in the code, especially in cases like these (as @Dalija Prasnikar also mentioned) ... Not to mention the hardware resources and all the cons ... I would not say that developing such an application for mobile devices is a wise choice, but surely I'm wrong ...
-
Strange behavior with "RANGE checking" and "Overflow checking"
DelphiUdIT posted a topic in RTL and Delphi Object Pascal
Hi, I was doing some tests and I came across a strange "behavior". The code here simply performs a division between a random value taken from an array and a constant via an assembler function, and returns the result of the division in integer and the remainder. Program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Diagnostics; //WinApi.Windows, {$IFDEF CPUX64} function DivandMod(Dividendo: UInt32; Divisore: UInt32; var Resto: UInt32): UInt32; overload; asm .noframe mov EAX, ECX mov ECX, EDX xor EDX, EDX div ECX mov DWORD PTR [R8], EDX end; {$ENDIF} const counting = 500_000_000; var i, k: UInt32; t: TStopWatch; a: TArray<UInt32>; resto: UInt32; //risultato: UInt32; //prochandle: THandle; begin // procHandle := GetCurrentProcess; // SetProcessAffinityMask(prochandle, $1); SetLength(a, counting + 1); t := TStopWatch.StartNew; for i := 0 to counting do a[i] := Random(High(Int32)); t.Stop; WriteLn('Load random values:':20, t.ElapsedMilliseconds); for k := 1 to 3 do begin t := TStopWatch.StartNew; for i := 0 to counting do DivandMod(a[i], 2039, resto); // risultato := DivandMod(-12, 7, resto); t.Stop; WriteLn('Test:':20, t.ElapsedMilliseconds); end; writeln(''); writeln('Press any key to close the program'); ReadLn; end. Now the code if compiled with the options "Overflow checking" and "Range checking" (typical of debugging) enabled has the times (in ms.) listed here: If they are disabled I would expect the times to improve, instead they get worse: Does anyone have any idea why? I noticed this because when running the program in RELEASE mode the times increased. I wasted some time trying to understand why, then simply activating or deactivating those options changes occur (this is independent of the DEBUG or RELEASE mode). Try with Windows 11, I9 14900HX , Delphi 12.2 last patch, project build for X64 without optimization and without stack frames. -
Strange behavior with "RANGE checking" and "Overflow checking"
DelphiUdIT replied to DelphiUdIT's topic in RTL and Delphi Object Pascal
You might be right. -
Strange behavior with "RANGE checking" and "Overflow checking"
DelphiUdIT replied to DelphiUdIT's topic in RTL and Delphi Object Pascal
I can change the two options in DEBUG or RELEASE and the final otput is the same, there are not difference between RELEASE and DEBUG: if I uncheck them in RELEASE the time increased like if I uncheck them in DEBUG. And I'm sure about the "inversion". I think the same. That is really strange, 'cause the instructions executed are the same in either (with or without check) but there are more others with check. And the "processor logic" seems to prefer the long path ....