View Single Post
  #3  
Old 10-08-2004, 15:48
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Im not sure if this is what you need.

I dont really use MASM and it has been a long time since i needed to power-use TASM.


This is from the delphi 6.0 help

Quote:
PE (portable executable) header flags


Type Flag
Syntax {$SetPEFlags <integer expression>}
{$SetPEOptFlags <integer expression>}
Scope Local
Microsoft relies on PE (portable executable) header flags to allow an application to indicate compatiblity with OS services or request advanced OS services. These directives provide powerful options for tuning your applications on high-end NT systems.

Warning: There is no error checking or masking of bit values specified by these directives. If you set the wrong combination of bits, you could corrupt your executable file.

These directives allow you to set flag bits in the PE file header Characteristics field and PE file optional header DLLCharacteristics field, respectively. Most of the Characteristics flags, set using $SetPEFlags, are specifically for object files and libraries. DLLCharacteristics, set using $SetPEOptFlags, are flags that describe when to call a DLL's entry point.

The <integer expression> in these directives can include Pascal constant identifiers, such as the IMAGE_FILE_xxxx constants defined in Windows.pas. Multiple constants should be OR'd together.

You can include these directives in source code multiple times. The flag values specified by multiple directives are strictly cumulative: if the first occurrence of the directive sets $03 and the second occurrence sets $10, the value written to the executable file at link time will be $13 (plus whatever bits the linker normally sets in the PE flag fields).

These directives only affect the output file if included in source code prior to linking. This means you should place these directives in a .dpr or .dpk file, not in a regular unit. Like the exe description directive, it's not an error to place these directives in unit source code, but these directives in unit source will not affect the output file (exe or dll) unless the unit source is recompiled at the time the output file is linked
Reply With Quote