Out of process COM server execution

后端 未结 2 1368
暖寄归人
暖寄归人 2021-01-05 17:28

I\'ve turned an ancient, but still useful, Delphi 5 application into an out of process COM server. I vaguely recall that there\'s a way to tell if it\'s started directly by

2条回答
  •  情深已故
    2021-01-05 18:17

    I do not know whether this was available in Delphi 5, but in Delphi 2010 you can query the global ComServer object for the start mode:

    if ComServer.StartMode = smAutomation then
      ShowMessage('started as automation server')
    else if ComServer.StartMode = smStandalone then
      ShowMessage('started manually');
    

提交回复
热议问题