Questions tagged [delphi-5]

Delphi 5 is a specific version of Delphi. It was released in August 1999. Use this tag for issues related to development in Delphi, version 5.

Delphi 5 is a specific version of Delphi.

Delphi 5 codename is Argus.

Delphi 5 was preceded by Delphi 4 and succeeded by Delphi 6.

395 questions
10
votes
4 answers

Delphi: How to avoid EIntOverflow underflow when subtracting?

Microsoft already says, in the documentation for GetTickCount, that you could never compare tick counts to check if an interval has passed. e.g.: Incorrect (pseudo-code): DWORD endTime = GetTickCount + 10000; //10 s from now ... if (GetTickCount >…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
10
votes
2 answers

Where and When is Application (TApplication) instance created?

Where and when is the Application instance created? (Same goes for the Screen instance) . I don't see anything in the Forms or System initialization section. In the CPU windows before Application.Initialize, I see a call to @_InitExe (SysInit) -…
kobik
  • 21,001
  • 4
  • 61
  • 121
10
votes
3 answers

How to create a type that is string?

A blog entry from Raymond Chen today made me realize the elegant solution to a problem i'm having. Various shell functions, rather than all taking ITEM­ID­LIST structure, can be made to only…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
9
votes
3 answers

How to call EnumSystemLocales in Delphi?

i am trying to call EnumSystemLocales in Delphi. For example: { Called for each supported locale. } function LocalesCallback(Name: PChar): BOOL; stdcall; begin OutputDebugString(Name); Result := Bool(1); //True end; procedure…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
9
votes
4 answers

How do I verify that a text box contains only numbers in Delphi?

Might it is very simple question but I never touched delphi. I have a edit box and that can accept character. But on some special condition I have to verify the edit box character are only numbers. How can we do that? Note: user can enter any char…
PawanS
  • 7,033
  • 14
  • 43
  • 71
9
votes
1 answer

Delphi "default" keyword with Record types in older Delphi versions

I have this code in Delphi Detours library which I'm trying to port: type TInstruction = record Archi: Byte; { CPUX32 or CPUX64 ! } AddrMode: Byte; { Address Mode } Addr: PByte; VirtualAddr: PByte; NextInst: PByte; { Pointer to…
zig
  • 4,524
  • 1
  • 24
  • 68
9
votes
1 answer

Delphi: Should a thread ever be created "not suspended"?

I've been trying to track down a memory leak in Jedi VCL's JvHidControllerClass.pas, which i came across this change in the source history: Older revision: constructor TJvHidDeviceReadThread.CtlCreate(const Dev: TJvHidDevice); begin inherited…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
9
votes
1 answer

How to get the EXCEPTION_POINTERS during an EExternal exception?

How do i get the EXCEPTION_POINTERS, i.e. both: PEXCEPTION_RECORD and PCONTEXT data during an EExternal exception? Background When Windows throws an exception, it passes a PEXCEPTION_POINTERS; a pointer to the exception information: typedef…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
9
votes
1 answer

How to render WebBrowser to device context?

i want to render a web-page (i.e. TWebBrowser) to a device context. i want to use Internet Explorer's layout engine to render content to a device context (i.e. metafile, pdf metafile). Starting with Internet Explorer 9 the IHTMLElementRender…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
8
votes
3 answers

Floating point division by zero exception in Delphi5

My app is written in Delphi5. I am using madExcept to track down bugs. I tracked down a "Floating point dvision by zero" exception, where it shouldn't be. The code segment, where it is raised, goes as followed: val:=100*Power(1.25,c); where 'c'…
simonescu
  • 462
  • 5
  • 17
8
votes
1 answer

FastMM fails to detect memory leaks

I'm using FastMM 4.97 in my application in Delphi5. Everything works well, if I run my application from the IDE with an intentional leak for test purposes. I get proper notices and error logs. However nothing happens if I run my application outside…
simonescu
  • 462
  • 5
  • 17
8
votes
3 answers

What is the quickest way to learn to support Delphi?

I have taken over support for some applications written in Delphi. I have programming experience, but none in Delphi, and very little in OOP. In the opinion of experienced Delphi programmers, what is the quickest way to learn how to decipher the…
Rex
  • 81
  • 2
8
votes
4 answers

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

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:…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
8
votes
3 answers

Delphi: At runtime find classes that descend from a given base class?

Is there at way, at runtime, to find all classes that descend from a particular base class? For example, pretend there is a class: TLocalization = class(TObject) ... public function GetLanguageName: string; end; or pretend there is a…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
8
votes
2 answers

Delphi SampleProfiler: How is this code calling into ntdll.dll?

i profiled a portion of my application using the Delphi Sampling Profiler. Like most people, i see a majority of the time spent inside ntdll.dll. Note: i turned on the options to ignore Application.Idle time, and calls from System.pas. So it …
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
2
3
26 27