To make a Delphi application terminal services aware

const
  IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;

Use the $SETPEOPTFLAGS directive: {$SETPEOPTFLAGS $8000}

This indicates to Windows that the Delphi application is Terminal Services aware and safe for use as a TS app.

Documentation in PE (portable executable) header flags (ms-help://borland.bds5/devcommon/peheaderflags_xml.html)

See also: Terminal Services Programming Guidelines