Jump to content

David Heffernan

Members
  • Content Count

    3711
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Build managed dll in Delphi

    No. That's a library for creating unmanaged exports from a managed library. So you take a C# library and use DllExport attributes to allow unmanaged code, like Delphi, to consume that C# library with LoadLibrary, GetProcAddress, etc. The question being asked here is very different. It asks if it is possible to make a managed library with Delphi. And that isn't possible.
  2. David Heffernan

    Micro optimization: Math.InRange

    I'm betting that improving the performance of InRange has no impact on the performance of these reports.
  3. David Heffernan

    TJsonTextWriter out of memory

    Use a SAX style parser rather than DOM style parser is sometimes an option
  4. David Heffernan

    "Divided by zero" exception

    Step 1 is to inspect the state of the floating point exception masks while your program is executing. Use trace debugging to do that. Check whether or not my hypothesis is correct.
  5. David Heffernan

    TArray<T> helper

    It's a helper for TArray, not for TArray<T>, by necessity. I think spring4d has something similar.
  6. David Heffernan

    Examples of Android apps

    If you aren't going to reuse existing delphi code then you should also evaluate other tools.
  7. David Heffernan

    InputQuery texts

    How would you handle non ANSI input?
  8. David Heffernan

    "Divided by zero" exception

    It's all proscribed by ieee754.
  9. David Heffernan

    "Divided by zero" exception

    Are you talking about maths, or talking about ieee754?
  10. David Heffernan

    "Divided by zero" exception

    Well, this depends on whether or not exceptions are masked.
  11. David Heffernan

    "Divided by zero" exception

    I'm not recommending anything. I'm just stating how ieee754 defines these operations.
  12. David Heffernan

    "Divided by zero" exception

    Well, for ieee754 the former is NaN and the latter is +inf.
  13. David Heffernan

    "Divided by zero" exception

    Do yourself a favour and check whether exceptions are masked in the two programs at the point where exveptions are raised.
  14. David Heffernan

    "Divided by zero" exception

    Probably you are calling some code, typically in a DLL, which changes the floating point control status to mask exceptions. Delphi default is for them to be unmasked, but most other Windows dev tools mask them.
  15. Well, Delphi's floating point library isn't threadsafe so they can have a party together!!
  16. Reading Marco's article on the recently released patches for 10.4.2 I noticed this text: Is that right? If you don't keep an active update subscription, you aren't entitled to bug fixes?
  17. David Heffernan

    Is set a nullable type? (record constraint)

    The code fails to compile in XE7 with the same E2512 error. I consider a set type to be a non-nullable value type so this must be a defect.
  18. David Heffernan

    Prevent Alt or Ctrl + Print Screen

    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.
  19. David Heffernan

    Do bug fix patches really require active subscription?

    You are on subscription when 10.4.2 lands, and then the subscription expires a month later.
  20. David Heffernan

    Find exception location from MAP file?

    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.
  21. You have already had numerous suggestions that meet all your requirements.
  22. David Heffernan

    Show a FMX form inside a dll from a VCL application

    Seems like a sound idea to me
  23. David Heffernan

    Find exception location from MAP file?

    Far quicker at this point to subtract $00401000 from the address (assuming it's an exe loaded at $00400000)
  24. David Heffernan

    Show a FMX form inside a dll from a VCL application

    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.
  25. David Heffernan

    Find exception location from MAP file?

    EurekaLog and madExcept can both do this. It's no big deal at all.
×