1

In Delphi, you can do something like this in the source code.

{$SETPEFLAGS IMAGE_FILE_LARGE_ADDRESS_AWARE}

How can I do the same thing in C# code so I don't have to use external command such as editbin

justyy
  • 5,831
  • 4
  • 40
  • 73
  • "How can I do the same thing in C# code" - You can't. (We'll maybe appart from hacking your own support into private build of roslyn maybe) – Christian.K Sep 25 '15 at 08:05
  • As an alternative to doing it in the source code: http://stackoverflow.com/questions/2597790/can-i-set-largeaddressaware-from-within-visual-studio – Joe Sep 25 '15 at 09:07
  • That option is already turned on by any reasonably up-to-date C# compiler. Still relying on it is getting pretty stale as well. – Hans Passant Oct 04 '15 at 17:02
  • 1
    @HansPassant, this is true, but I can't find any documentation for it. See my question: http://stackoverflow.com/questions/34905703/compiling-c-sharp-with-any-cpu-sets-application-can-handle-large-2gb-addresse – Chris Weber Jan 20 '16 at 16:45

1 Answers1

2

How can I do the same thing in C# code so I don't have to use external command such as editbin?

You cannot. You would need to use an external tool.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490