-
Content Count
3495 -
Joined
-
Last visited
-
Days Won
172
Everything posted by David Heffernan
-
We don't know what Settings is. How about a minimal but complete example.
-
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.
-
delphi7 Delphi 7 compatibility with Windows 11?
David Heffernan replied to jsen262's topic in General Help
Nope, still there, why would MS remove it -
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.
-
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
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? -
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
This is the only place in your program where you use string variables? And you don't use any classes? -
Decrement a value by 1 each time a function is called
David Heffernan replied to Willicious's topic in Delphi IDE and APIs
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? -
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
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! -
delphi7 Delphi 7 compatibility with Windows 11?
David Heffernan replied to jsen262's topic in General Help
Instead of us guessing, it would be more productive for you to boil this down to the simplest example that reproduces the issue. -
delphi7 Delphi 7 compatibility with Windows 11?
David Heffernan replied to jsen262's topic in General Help
Hard to know why this is happening with the information we have. -
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
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. -
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
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. -
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]
-
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Not sure what you mean by "this" -
How to execute a cmd file in delphi in invisible mode
David Heffernan replied to NBilov's topic in Windows API
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. -
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
VCL apps already do this -
How to execute a cmd file in delphi in invisible mode
David Heffernan replied to NBilov's topic in Windows API
What does "run a cmd file" mean? My guess is that you need to use CreateProcess with the CREATE_NO_WINDOW flag. -
Execution a process before run host application in delphi xe
David Heffernan replied to NBilov's topic in Delphi IDE and APIs
You aren't using Delphi XE. You are using 10.2. You can find your version stated in the about window in the IDE. -
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.
-
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Isn't the top of the stack protected by guard pages? -
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
The 32 bit behaviour is preferable. Why do you want to do anything after a stack overflow? -
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.
-
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.
-
Perhaps you haven't got a valid serial number.
-
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.