delphi-5

Access JCL Debug information contained in executable?

走远了吗. 提交于 2019-12-01 07:15:27
问题 Is there a way to access the Jedi Debug Information (JDBG) contained in an executable? Microsoft debugging tools have pointed me to a stack chain in my binary, and i want to know what methods/procedures/functions these offsets correspond to: user32.dll!SendMessageA+0x4c StackOverflow.exe+0x179263 StackOverflow.exe+0x2315b5 StackOverflow.exe+0x1fc82 StackOverflow.exe+0x50388 StackOverflow.exe+0x541fe user32.dll!gapfnScSendMessage+0x332 Obviously i'm calling SendMessage , but i don't know from

Delphi: When does reintroduce hide ancestors and when does it show them?

↘锁芯ラ 提交于 2019-11-30 14:54:19
Today Recently on Stackoverflow i learned that: reintroduce is used to hide ancestor constructors reintroduce is used to show ancestor constructors i've been trying to make sense of it all, so here is a another, very specific question, supporting my main question dealing with constructors . Update: replaced the entire question: TComputer = class(TObject) public constructor Create(Teapot: string=''); end; TCellPhone = class(TComputer) public constructor Create(Cup: Integer); overload; virtual; constructor Create(Cup: Integer; Teapot: string); overload; virtual; end; When constructing TCellPhone

Retrofitting Windows Event Log to a Delphi 5 app

不羁的心 提交于 2019-11-30 14:20:20
问题 I'm looking for a (fairly pain-free) means of adding some Windows Application Event-Log support to a small legacy Delphi 5 application. We just want it to log when it starts-up, shuts-down, fails to connect to a database etc. Several of the solutions/components I've seen seem to suggest that we'll need to make a resource DLL which the Windows Event Log Viewer will link to when trying to read our 'entries'. While this doesn't seem too onerous, I guess it's something else to keep in mind if

Delphi: All constants are constant, but some are more constant than others?

限于喜欢 提交于 2019-11-30 00:24:52
问题 Consider: const clHotlight: TColor = $00FF9933; clLink = clHotLight; //alias of clHotlight [Error] file.pas: Constant expression expected and the alternate wording that works: const clHotlight = TColor($00FF9933); clLink = clHotLight; //alias of clHotlight Explain. Then consider: const AdministratorGUID: TGUID = '{DE44EEA0-6712-11D4-ADD4-0006295717DA}'; SuperuserGUID = AdministratorGUID; //alias of AdministratorGUID [Error] file.pas: Constant expression expected And fix. Edit: Added keyword

Delphi: When does reintroduce hide ancestors and when does it show them?

青春壹個敷衍的年華 提交于 2019-11-29 21:21:04
问题 Today Recently on Stackoverflow i learned that: reintroduce is used to hide ancestor constructors reintroduce is used to show ancestor constructors i've been trying to make sense of it all, so here is a another, very specific question, supporting my main question dealing with constructors. Update: replaced the entire question: TComputer = class(TObject) public constructor Create(Teapot: string=''); end; TCellPhone = class(TComputer) public constructor Create(Cup: Integer); overload; virtual;

Tabs and colored lines in Listbox

自古美人都是妖i 提交于 2019-11-29 11:36:16
I am using a Tabbed Listbox component that was written by Fredric Rylander back in 1999 and it has been serving me well since then. :) Can't seem to find him anymore. I now have an application that needs both Tabbed Data and alternating colored lines in the Listbox. I can include the Component here for perusal if desired. I tried coloring the lines from here http://delphi.about.com/cs/adptips2002/a/bltip0602_4.htm But then it eats the Tabs, but I do get the alternating colored lines. Can someone please show me how to incorporate the two. Thanks Here's the Component unit myListBoxTabbed; {

Can Delphi only use a .dll if required?

坚强是说给别人听的谎言 提交于 2019-11-29 10:50:03
I have added these two methods to the 1st unit of my Delphi 5 application. function Inp(PortAddress: Integer): Integer; stdcall; external 'inpout32.dll' name 'Inp32'; procedure Output(PortAddress, Value: Integer); stdcall; external 'inpout32.dll' name 'Out32'; However I don't want to have to issue the inpout32 library with the software unless they explicitly need it. Currently the program says "Not Found" upon executing unless they're present in the root or System32. Users will only call these methods if they have a specific option set, but this is not gathered from the .ini file until after

Delphi: How to add a different constructor to a descendant?

混江龙づ霸主 提交于 2019-11-29 04:30:18
Update: The example i originally had was kind of complex. Here's a simple 8 line example that explains everything in one code block. The following does not compile gives a warning: TComputer = class(TObject) public constructor Create(Cup: Integer); virtual; end; TCellPhone = class(TComputer) public constructor Create(Cup: Integer; Teapot: string); virtual; end; Note: This question is part 3 in my ongoing series of questions about the subtlties of constructors in Delphi Original question How can i add a constructor to an existing class? Let's give an hypothetical example (i.e. one that i'm

What can my 32-bit app be doing that consumes gigabytes of physical RAM?

寵の児 提交于 2019-11-28 23:18:42
A co-worker mentioned to me a few months ago that one of our internal Delphi applications seems to be taking up 8 GB of RAM. I told him: That's not possible A 32-bit application only has a 32-bit virtual address space. Even if there was a memory leak, the most memory it could consume is 2 GB. After that allocations would fail (as there would be no empty space in the virtual address space). And in the case of a memory leak, the virtual pages will be swapped out to the pagefile, freeing up physical RAM. But he noted that Windows Resource Monitor indicated that less than 1 GB of RAM was available

Delphi: What is Application.Handle?

左心房为你撑大大i 提交于 2019-11-28 16:04:57
What is TApplication.Handle ? Where does it come from? Why does it exist? And most importantly: why do all forms have it as their parent window handle? The Delphi help says: TApplication.Handle Provides access to the window handle of the main form (window) of the application. property Handle: HWND; Description Use Handle when calling Windows API functions that require a parent window handle. For example, a DLL that displays its own top-level pop-up windows needs a parent window to display its windows in the application. Using the Handle property makes such windows part of the application, so