Delphi Exe throws Exception code: 0xc0000005 only on Windows 7 64 Bit

3.8k views Asked by At

I have one executable. Exe is prepared from Delphi version 5 as code is written in Delphi. This exe working successfully on Windows XP, Windows 7 with 32 bit operating system. But same executable not working on Windows 7 with 64 bit operating system. It will throw following error code Exception code: 0xc0000005.

The only option is to re compile the Delphi code and make it compatible to Windows 7 64 bit operating system. I have Google but do not find any suitable article. Therefore, can someone please help me out to resolve this issue.

I have good idea to make executable compatible for 32 and 64 bit but only in .NET Framework. So Please help me.

1

There are 1 answers

6
David Heffernan On

That error code is the NTSTATUS code for an access violation. For you to see that error code typically means that your application has raised an access violation during initialization. Once the Delphi RTL has initialized then those errors are converted into native Delphi EAccessViolation errors. So with high probability this is an error during initialization, possibly related to the way you link to or use a dependent module.

In order to solve the problem you need to do some debugging. The first thing I would do is to use Dependency Walker in profile mode to run your application. This will give you diagnostics of the load of your process at some point, presumably during the load an initialization of a module, you will see an error. Hopefully this will lead you to a solution.

Programs built with Delphi 5 do run on 64 bit Windows. You have an error in your program that needs debugging. Simple as that. Not the easiest error to debug, but it's still just a debugging exercise with your code.