Delphi 2007 IMAGE_FILE_LARGE_ADDRESS_AWARE

I want my application to be able to use more than 2 GB of memory, I searched googled and found that the IMAGE_FILE_LARGE_ADDRESS_AWARE command allows me to do this.

So I added

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} 

Into my program file .dpr after all uses and the line {$ R * .res},

but when I compile, I get an error message:

 E2003 Undeclared identifier: 'IMAGE_FILE_LARGE_ADDRESS_AWARE' 

What am I doing wrong?

Also, on Windows 7 64bit, do I need to tinker with the boot settings for this command, or just compile a 32-bit application with this command, and it will do the rest automatically?

thanks

+7
source share
2 answers

Also, on Windows 7 64bit, do I need to tinker with the boot settings for this command, or just compile a 32-bit application with this command, and it will do the rest automatically?

64-bit Windows will automatically provide 4 GB of address space with no boot settings.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb613473%28v=vs.85%29.aspx :

To allow the application to use a larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker bundled with Microsoft Visual C ++ supports / LARGEADDRESSAWARE set this flag. Setting this flag and then launching the application on a system that does not have 4GT support should not affect the application.

On 64-bit versions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.

+5
source

The answer to the actual question is to add a Windows unit to use.

+5
source

All Articles