I am working on a Delphi application which may be started either - directly, as a desktop application, by running the application (e.g. by clicking the executable in the explorer) or - indirectly, as an out of process server, by creating any of the COM objects implemented in (and registered by) the application
Is there a way to detect if my application has been started as an out of process COM Server or as a desktop application?