-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Prevent Alt or Ctrl + Print Screen
David Heffernan replied to Henry Olive's topic in RTL and Delphi Object Pascal
SetWindowDisplayAffinity(Application.MainFormHandle You really need to be calling this method from CreateWnd because of VCL window recreation. Also it's kinda odd that you would use MainFormHandle from a method of the main form. Why not use Handle? But it's important to move that code to CreateWnd. -
Do bug fix patches really require active subscription?
David Heffernan replied to David Heffernan's topic in General Help
You are on subscription when 10.4.2 lands, and then the subscription expires a month later. -
Find exception location from MAP file?
David Heffernan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Neither is more suited than the other for multi-threaded programs. I don't think your usage scenario is particularly challenging or unusual as you seem to think. -
Good quality Random number generator implementation
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
You have already had numerous suggestions that meet all your requirements. -
Show a FMX form inside a dll from a VCL application
David Heffernan replied to dkounal's topic in VCL
Seems like a sound idea to me -
Find exception location from MAP file?
David Heffernan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Far quicker at this point to subtract $00401000 from the address (assuming it's an exe loaded at $00400000) -
Show a FMX form inside a dll from a VCL application
David Heffernan replied to dkounal's topic in VCL
This is way more complicated than you might hope. Your VCL app will run a message loop that is designed for VCL. It's not going to be able to service your FMX form. I don't expect there is a simple solution. btw, INVALID_HANDLE_VALUE is for HANDLE types, i.e. THandle in Delphi. For an invalid HWND use NULL, which is 0 in Delphi. -
Find exception location from MAP file?
David Heffernan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
EurekaLog and madExcept can both do this. It's no big deal at all. -
Find exception location from MAP file?
David Heffernan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
madExcept, EurekaLog, etc. are the best ways to do this. But obviously you don't have that yet, so you can just subtract $00401000 from the address and look up that value in the Publics by Value section of the map file. -
Congrats to both of you
-
Good quality Random number generator implementation
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I don't get this. If you don't have any particular needs, then I don't see how anybody can offer suggestions. And if all you want is a list of libraries, then websearch will get you that. Do you know what you are going to do with these random numbers? -
Good quality Random number generator implementation
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
What properties are you looking for. The reason that there are many different algorithms in use is that different applications have different requirements. -
When you buy ebooks you are granted rights to read the book, not to send to others.
-
Not all free. Pretty galling for any of the authors of these books to read this post.
-
It depends entirely on what you want to learn about.
-
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Your way makes it impossible to pass an empty array. If an empty array is never valid, then fine. If an empty array is supported then the Pointer cast is preferable. -
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
The reason I prefer Pointer(data) is that it doesn't trigger range check error if the array has length 0. -
Start goes with finish, begin goes with end for nouns at least. For verbs start and stop are pairs.
-
Yeah, this is much better. And a good matching pair too.
-
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
You need to specify the calling convention, probably cdecl. And I'd declare it as PInteger and pass Pointer(data). -
I think start should pair with finish, begin pairs with end, from pairs with to, etc. Don't really like start paired with end.
-
ofc, the naming of TrimRight is a bit of a slap in the face for Arabic speakers and other RTL languages!!! Should really be TrimEnd and TrimBeginning or something like that...
-
TrimRight is what you want
-
Why Record pointer is not allowed as function parameter and return?
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Yes. You have to declare a pointer type. -
Bug in Android32 compiler
David Heffernan replied to Alexander Sviridenkov's topic in RTL and Delphi Object Pascal
All I am saying is that you don't need to special case INFs for comparison.