Delphi

Delphi communication with C++ dll (parameters)

荒凉一梦 提交于 2021-01-27 06:08:00
问题 Hi I'm having quite some issues with integrating a DLL inside my Delphi 2007 application. i suspect that I'm doing something wrong with the parameters of the calls. At this moment i have 2 issues, but i think they are related to eachother. 1) First call with the DLL: from the .h file: extern "C" { __declspec(dllexport) HRESULT Startup(char* version); } This call should initialize the DLL and give me the version back of the DLL. HRESULT should be 0, and the version pointer should contain the

Delphi communication with C++ dll (parameters)

不羁岁月 提交于 2021-01-27 06:07:06
问题 Hi I'm having quite some issues with integrating a DLL inside my Delphi 2007 application. i suspect that I'm doing something wrong with the parameters of the calls. At this moment i have 2 issues, but i think they are related to eachother. 1) First call with the DLL: from the .h file: extern "C" { __declspec(dllexport) HRESULT Startup(char* version); } This call should initialize the DLL and give me the version back of the DLL. HRESULT should be 0, and the version pointer should contain the

How to disable a TreeView control without selecting all nodes?

久未见 提交于 2021-01-27 05:01:13
问题 I don't know if this is a bug or something, but if I try to disable a TTreeView control, all the nodes become selected (grayed out)... Can anything be done to just disable the input for this control without changing the selection ? Of course, the node are not really selected, they are just visually selected, but this is annoying. 回答1: That's how the disabled control looks like when no theme is applied. You can modify it with little intervention to item drawing: procedure TForm1

“Pentium-safe FDIV” … in year 2014?

浪尽此生 提交于 2021-01-27 04:13:29
问题 Everytime I look in the compiler settings, the same question comes into my mind: Why does the current compiler of Delphi still have the "Pentium-safe FDIV" compiler option? The Pentium-FDIV-Bug was found in November 1994 and did not occur in CPU models of 1995. Processors at this time were probably only strong enough work with Windows 95, 98 and maybe also Me. As far as I know, the first Intel Pentium 1 CPU with 133 MHz (and therefore fast enough to reach the minimum system requirements of

How do you detect that a TEvent has been set?

让人想犯罪 __ 提交于 2021-01-27 02:12:14
问题 The Delphi XE2 documentation says this about TEvent: Sometimes, you need to wait for a thread to finish some operation rather than waiting for a particular thread to complete execution. To do this, use an event object. Event objects (System.SyncObjs.TEvent) should be created with global scope so that they can act like signals that are visible to all threads. When a thread completes an operation that other threads depend on, it calls TEvent.SetEvent. SetEvent turns on the signal, so any other

How do you detect that a TEvent has been set?

╄→尐↘猪︶ㄣ 提交于 2021-01-27 02:11:55
问题 The Delphi XE2 documentation says this about TEvent: Sometimes, you need to wait for a thread to finish some operation rather than waiting for a particular thread to complete execution. To do this, use an event object. Event objects (System.SyncObjs.TEvent) should be created with global scope so that they can act like signals that are visible to all threads. When a thread completes an operation that other threads depend on, it calls TEvent.SetEvent. SetEvent turns on the signal, so any other

How do you detect that a TEvent has been set?

送分小仙女□ 提交于 2021-01-27 02:10:08
问题 The Delphi XE2 documentation says this about TEvent: Sometimes, you need to wait for a thread to finish some operation rather than waiting for a particular thread to complete execution. To do this, use an event object. Event objects (System.SyncObjs.TEvent) should be created with global scope so that they can act like signals that are visible to all threads. When a thread completes an operation that other threads depend on, it calls TEvent.SetEvent. SetEvent turns on the signal, so any other

How do you detect that a TEvent has been set?

倾然丶 夕夏残阳落幕 提交于 2021-01-27 02:09:24
问题 The Delphi XE2 documentation says this about TEvent: Sometimes, you need to wait for a thread to finish some operation rather than waiting for a particular thread to complete execution. To do this, use an event object. Event objects (System.SyncObjs.TEvent) should be created with global scope so that they can act like signals that are visible to all threads. When a thread completes an operation that other threads depend on, it calls TEvent.SetEvent. SetEvent turns on the signal, so any other

Are concatenated Delphi strings held in a hidden temporary variable that retains a reference to the string?

主宰稳场 提交于 2021-01-27 00:38:29
问题 I'm trying to understand memory issues in a Delphi server application: originally I suspected an outright leak, but now believe we're seeing memory hanging around longer than it should due to the compiler's use of a hidden temporary when dynamically concatenating strings with +, causing painful free-space memory fragmentation. Background: This is a suite of 32-bit server applications on Windows, Delphi version is quite old, I think it's 7 but is for sure pre-Unicode, and uses the Nexus 3

Are concatenated Delphi strings held in a hidden temporary variable that retains a reference to the string?

南楼画角 提交于 2021-01-27 00:36:52
问题 I'm trying to understand memory issues in a Delphi server application: originally I suspected an outright leak, but now believe we're seeing memory hanging around longer than it should due to the compiler's use of a hidden temporary when dynamically concatenating strings with +, causing painful free-space memory fragmentation. Background: This is a suite of 32-bit server applications on Windows, Delphi version is quite old, I think it's 7 but is for sure pre-Unicode, and uses the Nexus 3