

Der schöne Günther
Members-
Content Count
555 -
Joined
-
Last visited
-
Days Won
8
Der schöne Günther last won the day on August 1 2021
Der schöne Günther had the most liked content!
Community Reputation
249 ExcellentTechnical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Embarcaderos documentation calls it a „folder to be used for the cache“ and I think that is misleading. You might want to read Microsofts documentation, which is pretty well-written and starts here: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder Also of interest: https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/ClearBrowsingData.md
-
Team competition - how to do it
Der schöne Günther replied to Stano's topic in Algorithms, Data Structures and Class Design
Maybe the heat is killing me, but I can't follow how some GUI elements (Labels, Checkboxes) go together with booleans, tags and "round type"s. Are you looking for recommendations of how to display this tournament process on screen? Do you want to know how to best store matches in a relational database? I have no idea. You probably have some written requirements, like a formal document or user stories. This should then enable you to figure out how your data works inside your application. -
Have any of you worked with Visual C++?
Der schöne Günther replied to 357mag's topic in General Help
Do you, by chance, not mean C++, but C++/CX by Microsoft? -
I second that. Make absolutely sure your mapfile is up to date and it is built at all. Not sure if you just toggled compiler optimisations, or switched from "Debug" to "Release" preset. I think (might be wrong) that by default, the "Release" preset doesn't even create a map file.
-
Custom sort of a TList with object references (works in 32 bit, does not in 64 bit)
Der schöne Günther replied to Alexander Halser's topic in Algorithms, Data Structures and Class Design
It's not TList<T> from System.Generics.Collections. It's the age-old TList from System.Classes. Straight from the documentation: System.Classes.TList.Sort - RAD Studio API Documentation (embarcadero.com) -
generics Destructor of Object in TObjectList<k,v> never gets called despite doOwnsValues
Der schöne Günther replied to omnibrain's topic in Algorithms, Data Structures and Class Design
Not trying to be a smartass, but doesn't the compiler warn you explicitly? Like -
How can I create a smith chart in c++ Builder 11.3 Alexandria
Der schöne Günther replied to kerravon99's topic in VCL
I am not familiar with that kind of chart, but TeeChart for VCL has it. smith.png (919×526) (steema.com) You will need to acquire the Pro version. Steema | Feature Matrix TeeChart VCL / FMX -
Why does a stack overflow cause a VCL application to terminate?
Der schöne Günther replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Good catch, it does. Absolutely, but I expected it to recover from it by popping the stack to the next exception handler and proceeding as usual. Does that mean a stack overflow in the main thread should generally be seen as non-recoverable and game over? -
Why does a stack overflow cause a VCL application to terminate?
Der schöne Günther posted a topic in RTL and Delphi Object Pascal
Consider this complete VCL application (Form1 & Button1): unit Unit1; interface uses System.SysUtils, System.Classes, Vcl.Forms, Vcl.StdCtrls, Vcl.Controls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure causeStackOverflow(); begin causeStackOverflow(); end; procedure TForm1.Button1Click(Sender: TObject); begin causeStackOverflow(); end; end. Clicking the button causes the application to hang for a bit, then the debugger will break on a EStackOverflow exception. That's totally expected. But directly after that, the application tries to display its regular error dialog, causing an access violation and then silently crashing. This is the callstack: It will then cause an access violation in user32.dll repeatedly and then crash. I have no idea why. 64 Bit is fine, by the way. It just happens with 32 Bit .exe. -
Getting the command line parameters of an executable
Der schöne Günther replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Why? I think that is actually a pretty decent way. -
Sounds like this here to me: https://quality.embarcadero.com/browse/RSP-40939
-
You need to get familiar with how TWebBrowser works. It can either use Internet Explorer or Microsofts Chromium-based "WebView2" runtime, if it is installed and your application has the "WebView2Loader.dll" in its path. If you are using Internet Explorer mode (and probably running in IE 7 mode), then you are correct, it will still show vertical scrollbars although the CSS says otherwise. In that case (if you really want to stick with the old Internet Explorer mode), you will need the non-html conforming <body scroll="no"> which Internet Explorer will understand:
-
Many thanks, that ist most helpful. I'll give it a read. I remember a system completely hanging up because one process had hundred thousands of handles it didn't close properly, then spawning a child process and trying to inherit all handles to it.
-
A ready to use solution (which I have never tried) is TurboPack/DOSCommand: This component let you execute a dos program (exe, com or batch file) and catch the ouput in order to put it in a memo or in a listbox. (github.com) It is said to be available throught "GetIt" as well. For myself, I did it as also suggested by this fine gentleman here For the processes I spawn myself (via CreateProcess()), I just create two pipes and then use WriteFile(..) and ReadFile(..) on them. It is important that CreateProcess(..) has its "inherit handles" parameter to true. If you're stuck, I might post my solution, but it contains a a lot of noise as well (such as moving the created process to a "job object" to allow easier resource scheduling or termination)
-
There is plenty of examples on how to do this with Delphi, you already got the correct term: It's (inter-process) communication (IPC) via "pipes". I'd recommend to start a bit more humble by making a small console app by yourself that will, for example, take two numbers from the input, and return the sum of these two numbers. Then, try sending these two numbers to your console app and getting the result back. If that works, you can do that with your free pascal compiler. By the way: Cmd.exe is nothing more than a front-end that just does what your application wants to do. You don't need to "connect" to a cmd.exe. You will directly launch and communicate with your free pascal compiler.