Jump to content

David Heffernan

Members
  • Content Count

    3495
  • Joined

  • Last visited

  • Days Won

    172

Everything posted by David Heffernan

  1. David Heffernan

    ini file not writtable

    We don't know what Settings is. How about a minimal but complete example.
  2. David Heffernan

    security with no access to the cmd.exe

    It depends on what your external processes do. If you are trying to do something that will be locked down then I guess it will be affected. But calling CreateProcess per se doesn't requires cmd.exe. Unless that's the process that you are trying to create.
  3. David Heffernan

    Delphi 7 compatibility with Windows 11?

    Nope, still there, why would MS remove it
  4. David Heffernan

    Sorting two lists in step?

    Is you real problem that these two strings belong together? In which case declare a record with them in, store them in TList<TYourRecord> and that's the answer, end of story.
  5. David Heffernan

    How can I allocate memory without raising exceptions ?

    Yeah, just try setting a break point on the GetMem function implementation and see how many times it gets hit. I ask again. Does you program use any string variables? Does it instantiate any classes? What is you policy for these heap allocations? Why are you creating problems where there are none?
  6. David Heffernan

    How can I allocate memory without raising exceptions ?

    This is the only place in your program where you use string variables? And you don't use any classes?
  7. David Heffernan

    Decrement a value by 1 each time a function is called

    It's something of an anti-pattern to call Randomize more than once in the lifetime of a process. Why do you have this call here?
  8. David Heffernan

    How can I allocate memory without raising exceptions ?

    If memory can't be allocated then the message can't be sent and presumably the program stops working? I think your model of avoiding try is probably very flawed. You are about to call PostMessage which has a kernel mode transition. Your try is not the hot-spot in this code!
  9. David Heffernan

    Delphi 7 compatibility with Windows 11?

    Instead of us guessing, it would be more productive for you to boil this down to the simplest example that reproduces the issue.
  10. David Heffernan

    Delphi 7 compatibility with Windows 11?

    Hard to know why this is happening with the information we have.
  11. David Heffernan

    How can I allocate memory without raising exceptions ?

    Because when memory allocation fails it's very hard to recover. Also, you don't control the allocation for strings. The rtl does that. You'd need to redesign you entire program to work with low memory scenarios. The entire rtl/vcl etc. is not designed to work in these scenarios.
  12. David Heffernan

    How can I allocate memory without raising exceptions ?

    What do you want to happen if memory allocation fails? Isn't process termination actually the best thing? When you say string, you can't expect to do this for built in string types since you don't control how they are allocated.
  13. David Heffernan

    Sorting two lists in step?

    Create an array of integers 0 to N-1, sort that leaving the raw lists unchanged. Whenever you want to refer to an item in either list, instead of list use list[arr]
  14. Not sure what you mean by "this"
  15. David Heffernan

    How to execute a cmd file in delphi in invisible mode

    This relies on the other process to respond to that flag, and they often won't. And certainly they won't of they are console apps. It's a very common mistake to try to run a console app with ShellExecuteEx which is designed to execute shell verbs not to create processes.
  16. VCL apps already do this
  17. David Heffernan

    How to execute a cmd file in delphi in invisible mode

    What does "run a cmd file" mean? My guess is that you need to use CreateProcess with the CREATE_NO_WINDOW flag.
  18. You aren't using Delphi XE. You are using 10.2. You can find your version stated in the about window in the IDE.
  19. David Heffernan

    Encryption

    That looks like base64 encoded binary data. No evidence that it is encrypted. You must know more about where this text came from. That information is probably useful.
  20. Isn't the top of the stack protected by guard pages?
  21. The 32 bit behaviour is preferable. Why do you want to do anything after a stack overflow?
  22. David Heffernan

    Creating multiple threads in a DLL

    We don't know what your code does, and how it interacts with its host. Nobody can answer your question with the amount of information provided here.
  23. David Heffernan

    Rendering form content

    Are these all windowed controls? Seems like something like this might be better as a single custom control. I'd expect that to have much better performance.
  24. David Heffernan

    CE registering problem

    Perhaps you haven't got a valid serial number.
  25. David Heffernan

    calling C code from Delphi

    Compile the code into a dll and link that. Directly linking obj files is possible but it can be tricky. Especially for 64 bit code where the compiler doesn't respect exception table meta data.
×